IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_ER_WRITEOFFDETAIL' AND KSQL_COL_NAME ='FCOSTCOMPANYID') 
 ALTER TABLE T_ER_WRITEOFFDETAIL ADD (FCOSTCOMPANYID BIGINT DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_ER_WRITEOFFDETAIL' AND KSQL_COL_NAME ='FCOSTDEPTID') 
 ALTER TABLE T_ER_WRITEOFFDETAIL ADD (FCOSTDEPTID BIGINT DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_ER_PUBREIMWRIOFFDET' AND KSQL_COL_NAME ='FCOSTCOMPANYID') 
 ALTER TABLE T_ER_PUBREIMWRIOFFDET ADD (FCOSTCOMPANYID BIGINT DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_ER_PUBREIMWRIOFFDET' AND KSQL_COL_NAME ='FCOSTDEPTID') 
 ALTER TABLE T_ER_PUBREIMWRIOFFDET ADD (FCOSTDEPTID BIGINT DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_ER_REIMBCLEARLOANENTRY' AND KSQL_COL_NAME ='FCOSTCOMPANYID') 
 ALTER TABLE T_ER_REIMBCLEARLOANENTRY ADD (FCOSTCOMPANYID BIGINT DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_ER_REIMBCLEARLOANENTRY' AND KSQL_COL_NAME ='FCOSTDEPTID') 
 ALTER TABLE T_ER_REIMBCLEARLOANENTRY ADD (FCOSTDEPTID BIGINT DEFAULT 0 NOT NULL );
