/**Begin E:\NextERP_PDM\PDM_UPGRADE\PDMS\branch_lastest(平台_业务)\pdm\BCM_table.sql **/
/**EXEC p_AlterColumn 'T_BCM_SCHEMECOLLECTLOG', 'FMODIFYDATE', 'DATETIME', 'NULL', '0010', ''; **/


IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_BCM_EXCHANGERATE' AND KSQL_COL_NAME IN ('FUSERDEFINE20')) 
 ALTER TABLE T_BCM_EXCHANGERATE ADD (FUSERDEFINE20 DECIMAL(23,10) DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_BCM_EXCHANGERATE' AND KSQL_COL_NAME IN ('FUSERDEFINE19')) 
 ALTER TABLE T_BCM_EXCHANGERATE ADD (FUSERDEFINE19 DECIMAL(23,10) DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_BCM_EXCHANGERATE' AND KSQL_COL_NAME IN ('FUSERDEFINE18')) 
 ALTER TABLE T_BCM_EXCHANGERATE ADD (FUSERDEFINE18 DECIMAL(23,10) DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_BCM_EXCHANGERATE' AND KSQL_COL_NAME IN ('FUSERDEFINE17')) 
 ALTER TABLE T_BCM_EXCHANGERATE ADD (FUSERDEFINE17 DECIMAL(23,10) DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_BCM_EXCHANGERATE' AND KSQL_COL_NAME IN ('FUSERDEFINE16')) 
 ALTER TABLE T_BCM_EXCHANGERATE ADD (FUSERDEFINE16 DECIMAL(23,10) DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_BCM_EXCHANGERATE' AND KSQL_COL_NAME IN ('FUSERDEFINE15')) 
 ALTER TABLE T_BCM_EXCHANGERATE ADD (FUSERDEFINE15 DECIMAL(23,10) DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_BCM_EXCHANGERATE' AND KSQL_COL_NAME IN ('FUSERDEFINE14')) 
 ALTER TABLE T_BCM_EXCHANGERATE ADD (FUSERDEFINE14 DECIMAL(23,10) DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_BCM_EXCHANGERATE' AND KSQL_COL_NAME IN ('FUSERDEFINE13')) 
 ALTER TABLE T_BCM_EXCHANGERATE ADD (FUSERDEFINE13 DECIMAL(23,10) DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_BCM_EXCHANGERATE' AND KSQL_COL_NAME IN ('FUSERDEFINE12')) 
 ALTER TABLE T_BCM_EXCHANGERATE ADD (FUSERDEFINE12 DECIMAL(23,10) DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_BCM_EXCHANGERATE' AND KSQL_COL_NAME IN ('FUSERDEFINE11')) 
 ALTER TABLE T_BCM_EXCHANGERATE ADD (FUSERDEFINE11 DECIMAL(23,10) DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_BCM_EXCHANGERATE' AND KSQL_COL_NAME IN ('FUSERDEFINE10')) 
 ALTER TABLE T_BCM_EXCHANGERATE ADD (FUSERDEFINE10 DECIMAL(23,10) DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_BCM_EXCHANGERATE' AND KSQL_COL_NAME IN ('FUSERDEFINE9')) 
 ALTER TABLE T_BCM_EXCHANGERATE ADD (FUSERDEFINE9 DECIMAL(23,10) DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_BCM_EXCHANGERATE' AND KSQL_COL_NAME IN ('FUSERDEFINE8')) 
 ALTER TABLE T_BCM_EXCHANGERATE ADD (FUSERDEFINE8 DECIMAL(23,10) DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_BCM_EXCHANGERATE' AND KSQL_COL_NAME IN ('FUSERDEFINE7')) 
 ALTER TABLE T_BCM_EXCHANGERATE ADD (FUSERDEFINE7 DECIMAL(23,10) DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_BCM_EXCHANGERATE' AND KSQL_COL_NAME IN ('FUSERDEFINE6')) 
 ALTER TABLE T_BCM_EXCHANGERATE ADD (FUSERDEFINE6 DECIMAL(23,10) DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_BCM_EXCHANGERATE' AND KSQL_COL_NAME IN ('FUSERDEFINE5')) 
 ALTER TABLE T_BCM_EXCHANGERATE ADD (FUSERDEFINE5 DECIMAL(23,10) DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_BCM_EXCHANGERATE' AND KSQL_COL_NAME IN ('FUSERDEFINE4')) 
 ALTER TABLE T_BCM_EXCHANGERATE ADD (FUSERDEFINE4 DECIMAL(23,10) DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_BCM_EXCHANGERATE' AND KSQL_COL_NAME IN ('FUSERDEFINE3')) 
 ALTER TABLE T_BCM_EXCHANGERATE ADD (FUSERDEFINE3 DECIMAL(23,10) DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_BCM_EXCHANGERATE' AND KSQL_COL_NAME IN ('FUSERDEFINE2')) 
 ALTER TABLE T_BCM_EXCHANGERATE ADD (FUSERDEFINE2 DECIMAL(23,10) DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_BCM_EXCHANGERATE' AND KSQL_COL_NAME IN ('FUSERDEFINE1')) 
 ALTER TABLE T_BCM_EXCHANGERATE ADD (FUSERDEFINE1 DECIMAL(23,10) DEFAULT 0 NOT NULL );
 

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