/**Begin D:\DBA\PDM_UPGRADE\PDM1\BCM_table.sql **/
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_BCM_DSPPARAMENTITY' AND KSQL_COL_NAME IN ('FMERGEFLOWSTATUS')) 
 ALTER TABLE T_BCM_DSPPARAMENTITY ADD (FMERGEFLOWSTATUS CHAR(1) DEFAULT '1' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_BCM_DSPPARAMENTITY' AND KSQL_COL_NAME IN ('FRESULTTYPE')) 
 ALTER TABLE T_BCM_DSPPARAMENTITY ADD (FRESULTTYPE VARCHAR(5) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_BCM_DSPPARAMENTITY' AND KSQL_COL_NAME IN ('FSENDTYPE')) 
 ALTER TABLE T_BCM_DSPPARAMENTITY ADD (FSENDTYPE VARCHAR(10) DEFAULT ' ' NOT NULL );

IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_BCM_CHKCSLSCHEME') 
 CREATE TABLE T_BCM_CHKCSLSCHEME (
FPKID BIGINT DEFAULT 0 NOT NULL,
FID BIGINT DEFAULT 0 NOT NULL,
FBASEDATAID BIGINT DEFAULT 0 NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_BCM_DSPPARAMRECEIVER') 
 CREATE TABLE T_BCM_DSPPARAMRECEIVER (
FPKID BIGINT DEFAULT 0 NOT NULL,
FID BIGINT DEFAULT 0 NOT NULL,
FBASEDATAID BIGINT DEFAULT 0 NOT NULL
);



/**End D:\DBA\PDM_UPGRADE\PDM1\BCM_table.sql **/
