IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_PUR_SALOUTSTOCKENTRY_A' AND KSQL_COL_NAME IN ('FDSBILLID')) 
 ALTER TABLE T_PUR_SALOUTSTOCKENTRY_A ADD (FDSBILLID VARCHAR(80) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_PUR_SALOUTSTOCKENTRY_A' AND KSQL_COL_NAME IN ('FDSENTRYID')) 
 ALTER TABLE T_PUR_SALOUTSTOCKENTRY_A ADD (FDSENTRYID VARCHAR(80) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_PUR_SALOUTSTOCKENTRY' AND KSQL_COL_NAME IN ('FDSBILLNO')) 
 ALTER TABLE T_PUR_SALOUTSTOCKENTRY ADD (FDSBILLNO NVARCHAR(80) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_PUR_DELIVERYSCHENTRY' AND KSQL_COL_NAME IN ('FESTIMATEDDELIVERYDATE')) 
 ALTER TABLE T_PUR_DELIVERYSCHENTRY ADD (FESTIMATEDDELIVERYDATE DATETIME );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_PUR_SALOUTSTOCKENTRY' AND KSQL_COL_NAME IN ('FPROMISEDATE')) 
 ALTER TABLE T_PUR_SALOUTSTOCKENTRY ADD (FPROMISEDATE DATETIME );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_PUR_DELIVERYSCHENTRY' AND KSQL_COL_NAME IN ('FSUMOUTSTOCKBASEQTY')) 
 ALTER TABLE T_PUR_DELIVERYSCHENTRY ADD (FSUMOUTSTOCKBASEQTY DECIMAL(23,10) DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_PUR_DELIVERYSCHENTRY' AND KSQL_COL_NAME IN ('FSUMOUTSTOCKQTY')) 
 ALTER TABLE T_PUR_DELIVERYSCHENTRY ADD (FSUMOUTSTOCKQTY DECIMAL(23,10) DEFAULT 0 NOT NULL );