/**BEGIN E:\NEXTERP_PDM\PDM_UPGRADE\PDMS\BRANCH_LASTEST\PDM\EB_TABLE.SQL **/ 
  IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_EB_BGAPPLYBILL' AND KSQL_COL_NAME IN ('FAPPROVELEVEL')) 
 ALTER TABLE T_EB_BGAPPLYBILL ADD (FAPPROVELEVEL VARCHAR(100) DEFAULT ' ' );
  IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_EB_BGAPPLYBILL' AND KSQL_COL_NAME IN ('FREJECTADJTIME')) 
 ALTER TABLE T_EB_BGAPPLYBILL ADD (FREJECTADJTIME DATETIME);
  IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_EB_BGAPPLYBILL' AND KSQL_COL_NAME IN ('FREJECTADJUSER')) 
 ALTER TABLE T_EB_BGAPPLYBILL ADD (FREJECTADJUSER BIGINT DEFAULT 0);
 
  IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_EB_BILLREJECTLOG' AND KSQL_COL_NAME IN ('FAFTERMODIFYROWDATAJSON')) 
 ALTER TABLE T_EB_BILLREJECTLOG ADD (FAFTERMODIFYROWDATAJSON NVARCHAR(2000) DEFAULT ' ' );
 
 EXEC p_AlterColumn 'T_EB_BILLREJECTLOG', 'FMODIFYROWDATAJSON', 'NCLOB', 'NULL', '1111', 'NULL';
 EXEC p_AlterColumn 'T_EB_BILLREJECTLOG', 'FAFTERMODIFYROWDATAJSON', 'NCLOB', 'NULL', '1111', 'NULL';
/**END E:\NEXTERP_PDM\PDM_UPGRADE\PDMS\BRANCH_LASTEST\PDM\EB_TABLE.SQL **/