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

IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_BCM_INTRREPORT') 
 CREATE TABLE T_BCM_INTRREPORT (
FID BIGINT DEFAULT 0 NOT NULL,
FTEMPLATEID BIGINT DEFAULT 0 NOT NULL,
FMODELID BIGINT DEFAULT 0 NOT NULL,
FSCENEID BIGINT DEFAULT 0 NOT NULL,
FYEARID BIGINT DEFAULT 0 NOT NULL,
FPERIODID BIGINT DEFAULT 0 NOT NULL,
FCURRENCYID BIGINT DEFAULT 0 NOT NULL,
FENTITYID BIGINT DEFAULT 0 NOT NULL,
FSTATUS CHAR(1) DEFAULT ' ' NOT NULL,
FCOMPLETERID BIGINT DEFAULT 0 NOT NULL,
FCOMPLETETIME DATETIME,
FCOMMITORID BIGINT DEFAULT 0 NOT NULL,
FCOMMITTIME DATETIME,
FFIRSTCOMMITTIME DATETIME,
FCOMMITTIMES INT DEFAULT 0 NOT NULL,
FSENDBACKERID BIGINT DEFAULT 0 NOT NULL,
FSENDBACKTIME DATETIME,
FSENDBACKTIMES INT DEFAULT 0 NOT NULL,
FCREATORID BIGINT DEFAULT 0 NOT NULL,
FCREATETIME DATETIME,
FMODIFIERID BIGINT DEFAULT 0 NOT NULL,
FMODIFYTIME DATETIME
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_BCM_INTRREPORT_S') 
 CREATE TABLE T_BCM_INTRREPORT_S (
FID BIGINT DEFAULT 0 NOT NULL,
FSPREADJSON NCLOB,
FDATA NCLOB
);


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