/**Begin E:\NextERP_PDM\PDM_UPGRADE\PDMS\branch_lastest\pdm\SM_table.sql **/
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_SM_RETURNAPPLY' AND KSQL_COL_NAME ='FBILLSTATUS') 
 ALTER TABLE T_SM_RETURNAPPLY ADD (FBILLSTATUS VARCHAR(5) DEFAULT ' ' NOT NULL );
 --- drop column --------- 请认真检查该脚本 ------------------- 
 EXEC p_AlterColumn 'T_SM_RETURNAPPLY', 'FBLLSSTATUS', 'NULL', 'NULL', '1001', 'NULL';

IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_SM_RETURNAPPLYENTRY_F' AND KSQL_COL_NAME ='FPRICEANDTAX') 
 ALTER TABLE T_SM_RETURNAPPLYENTRY_F ADD (FPRICEANDTAX DECIMAL(19,6) DEFAULT 0 NOT NULL );
 --- drop column --------- 请认真检查该脚本 ------------------- 
 EXEC p_AlterColumn 'T_SM_RETURNAPPLYENTRY_F', 'FPRICEANDRAX', 'NULL', 'NULL', '1001', 'NULL';


/**End E:\NextERP_PDM\PDM_UPGRADE\PDMS\branch_lastest\pdm\SM_table.sql **/
