/**Begin E:\NextERP_PDM\PDM_UPGRADE\PDMS\branch_lastest\pdm\BEI_table.sql **/
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_BEI_UPDATEPAYSTAT' AND KSQL_COL_NAME IN ('FSKIPPROC')) 
 ALTER TABLE T_BEI_UPDATEPAYSTAT ADD (FSKIPPROC CHAR(1) DEFAULT '0' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_BEI_UPDATEPAYSTAT_ENTRY' AND KSQL_COL_NAME IN ('FRECUSER')) 
 ALTER TABLE T_BEI_UPDATEPAYSTAT_ENTRY ADD (FRECUSER NVARCHAR(80) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_BEI_UPDATEPAYSTAT_ENTRY' AND KSQL_COL_NAME IN ('FRECBANK')) 
 ALTER TABLE T_BEI_UPDATEPAYSTAT_ENTRY ADD (FRECBANK NVARCHAR(80) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_BEI_UPDATEPAYSTAT_ENTRY' AND KSQL_COL_NAME IN ('FPAYACCT')) 
 ALTER TABLE T_BEI_UPDATEPAYSTAT_ENTRY ADD (FPAYACCT NVARCHAR(80) DEFAULT ' ' NOT NULL );
 --- drop column --------- 请认真检查该脚本 ------------------- 
 EXEC p_AlterColumn 'T_BEI_UPDATEPAYSTAT_ENTRY', 'FSUBACCT', 'NULL', 'NULL', '1001', 'NULL';


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