IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_BEI_TRANSDETAIL_E' AND KSQL_COL_NAME IN ('FDATASOURCES')) 
 ALTER TABLE T_BEI_TRANSDETAIL_E ADD (FDATASOURCES CHAR(1) DEFAULT '0' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_BEI_TRANSDETAIL_E' AND KSQL_COL_NAME IN ('FAGENTACCNO')) 
 ALTER TABLE T_BEI_TRANSDETAIL_E ADD (FAGENTACCNO NVARCHAR(80) DEFAULT ' ' NOT NULL );