IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_PMTS_TASK' AND KSQL_COL_NAME ='FACTUALDATE')
 ALTER TABLE T_PMTS_TASK ADD (FACTUALDATE DATETIME );
 
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_PMTS_WBS' AND KSQL_COL_NAME ='FBASELINENAME')
 ALTER TABLE T_PMTS_WBS ADD (FBASELINENAME NVARCHAR(50) DEFAULT ' ' NOT NULL );
 
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_PMTS_WBS' AND KSQL_COL_NAME ='FBASELINETYPE')
 ALTER TABLE T_PMTS_WBS ADD (FBASELINETYPE NVARCHAR(50) DEFAULT ' ' NOT NULL );
 
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_PMTS_WBS' AND KSQL_COL_NAME ='FBSSTARTDATE')
 ALTER TABLE T_PMTS_WBS ADD (FBSSTARTDATE DATETIME );
 
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_PMTS_WBS' AND KSQL_COL_NAME ='FBSENDDATE')
 ALTER TABLE T_PMTS_WBS ADD (FBSENDDATE DATETIME );
 
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_PMTS_WBS' AND KSQL_COL_NAME ='FBSPLANDATE')
 ALTER TABLE T_PMTS_WBS ADD (FBSPLANDATE DECIMAL(23,10) DEFAULT 0 NOT NULL );
 
