/**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_TRANSDETAIL' AND KSQL_COL_NAME IN ('FEXCHANGEREATE')) 
 ALTER TABLE T_BEI_TRANSDETAIL ADD (FEXCHANGEREATE DECIMAL(23,10) DEFAULT 0 NOT NULL );
 --- drop column --------- 请认真检查该脚本 ------------------- 
 EXEC p_AlterColumn 'T_BEI_TRANSDETAIL', 'FEXCHANGERATE', 'NULL', 'NULL', '1001', 'NULL';

IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_BEI_BANKBALANCE' AND KSQL_COL_NAME IN ('FEXCHARGERATE')) 
 ALTER TABLE T_BEI_BANKBALANCE ADD (FEXCHARGERATE DECIMAL(23,10) DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_BEI_BANKBALANCE' AND KSQL_COL_NAME IN ('FDATASOURCE')) 
 ALTER TABLE T_BEI_BANKBALANCE ADD (FDATASOURCE CHAR(1) DEFAULT '0' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_BEI_BANKBALANCE' AND KSQL_COL_NAME IN ('FDESCRIPTION')) 
 ALTER TABLE T_BEI_BANKBALANCE ADD (FDESCRIPTION NVARCHAR(255) DEFAULT ' ' NOT NULL );
 --- drop column --------- 请认真检查该脚本 ------------------- 
 EXEC p_AlterColumn 'T_BEI_BANKBALANCE', 'FEXCHANGERATE', 'NULL', 'NULL', '1001', 'NULL';

 --- drop column --------- 请认真检查该脚本 ------------------- 
 EXEC p_AlterColumn 'T_BEI_BANKBALANCE', 'FDATASOURCES', 'NULL', 'NULL', '1001', 'NULL';

 --- drop column --------- 请认真检查该脚本 ------------------- 
 EXEC p_AlterColumn 'T_BEI_BANKBALANCE', 'FABSTRACT', 'NULL', 'NULL', '1001', 'NULL';

IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_BEI_TRANSDETAIL_E' AND KSQL_COL_NAME IN ('FDATASOURCE')) 
 ALTER TABLE T_BEI_TRANSDETAIL_E ADD (FDATASOURCE CHAR(1) DEFAULT '0' NOT NULL );
 --- drop column --------- 请认真检查该脚本 ------------------- 
 EXEC p_AlterColumn 'T_BEI_TRANSDETAIL_E', 'FDATASOURCES', 'NULL', 'NULL', '1001', 'NULL';


/**End E:\NextERP_PDM\PDM_UPGRADE\PDMS\branch_lastest(平台_业务)\pdm\BEI_table.sql **/
