IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_BD_PROJECTSTATUS' AND KSQL_COL_NAME ='FDIRECTION') 
 ALTER TABLE T_BD_PROJECTSTATUS ADD (FDIRECTION VARCHAR(50) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_BD_STATUS_SCOPE') 
 CREATE TABLE T_BD_STATUS_SCOPE (
FPKID BIGINT DEFAULT 0 NOT NULL,
FID BIGINT DEFAULT 0 NOT NULL,
FBASEDATAID BIGINT DEFAULT 0 NOT NULL
);