/**Begin C:\PDM_UPGRADE\PDM1\PUR_table.sql **/
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_PUR_RECEIPT' AND KSQL_COL_NAME IN ('FREQPERSONID')) 
 ALTER TABLE T_PUR_RECEIPT ADD (FREQPERSONID BIGINT DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_PUR_RECEIPT' AND KSQL_COL_NAME IN ('FPURDEPTID')) 
 ALTER TABLE T_PUR_RECEIPT ADD (FPURDEPTID BIGINT DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_PUR_RECEIPTENTRY_A' AND KSQL_COL_NAME IN ('FSUMRECRETQTY')) 
 ALTER TABLE T_PUR_RECEIPTENTRY_A ADD (FSUMRECRETQTY DECIMAL(23,10) DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_PUR_RECEIPTENTRY_A' AND KSQL_COL_NAME IN ('FSUMRECRETBASEQTY')) 
 ALTER TABLE T_PUR_RECEIPTENTRY_A ADD (FSUMRECRETBASEQTY DECIMAL(23,10) DEFAULT 0 NOT NULL );

/**End C:\PDM_UPGRADE\PDM1\PUR_table.sql **/
