/**Begin D:\PDM_UPGRADE\PDM1\BCM_table.sql **/
IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_BCM_STRUCTOFENTPART') 
 CREATE TABLE T_BCM_STRUCTOFENTPART (
FID BIGINT DEFAULT 0 NOT NULL,
FMERGERNODE CHAR(1) DEFAULT '0' NOT NULL,
FISOFFSETENTRY CHAR(1) DEFAULT '0' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_BCM_STRUCTOFENT' AND KSQL_COL_NAME IN ('FENTITYPART')) 
 ALTER TABLE T_BCM_STRUCTOFENT ADD (FENTITYPART BIGINT DEFAULT 0 NOT NULL );


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