
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_MSPLAN_INVLEVEL' AND KSQL_COL_NAME ='FAUDITORID') 
 ALTER TABLE T_MSPLAN_INVLEVEL ADD (FAUDITORID BIGINT DEFAULT 0 NOT NULL );

IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_MSPLAN_INVLEVEL' AND KSQL_COL_NAME ='FAUDITTIME') 
 ALTER TABLE T_MSPLAN_INVLEVEL ADD (FAUDITTIME DATETIME );
 
 IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_MSPLAN_INVLEVEL' AND KSQL_COL_NAME ='FDISABLER') 
 ALTER TABLE T_MSPLAN_INVLEVEL ADD (FDISABLER BIGINT DEFAULT 0 NOT NULL );

IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_MSPLAN_INVLEVEL' AND KSQL_COL_NAME ='FDISABLEDATE') 
 ALTER TABLE T_MSPLAN_INVLEVEL ADD (FDISABLEDATE DATETIME );