/**Begin D:\PDM_UPGRADE\PDM1\FCS_table.sql **/
IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_FCS_SUSPECTSET') 
 CREATE TABLE T_FCS_SUSPECTSET (
FID BIGINT DEFAULT 0 NOT NULL,
FNUMBER NVARCHAR(80) DEFAULT ' ' NOT NULL,
FNAME NVARCHAR(255) DEFAULT ' ' NOT NULL,
FSTATUS NVARCHAR(30) DEFAULT ' ' NOT NULL,
FCREATORID BIGINT DEFAULT 0 NOT NULL,
FMODIFIERID BIGINT DEFAULT 0 NOT NULL,
FENABLE NVARCHAR(30) DEFAULT ' ' NOT NULL,
FCREATETIME DATETIME,
FMODIFYTIME DATETIME,
FMASTERID BIGINT DEFAULT 0 NOT NULL,
FDISABLERID BIGINT DEFAULT 0 NOT NULL,
FENABLERID BIGINT DEFAULT 0 NOT NULL,
FENABLEDATE DATETIME,
FDISABLEDATE DATETIME,
FDESTENTITYID NVARCHAR(50) DEFAULT ' ' NOT NULL,
FCHECKSIGNFIELD NVARCHAR(50) DEFAULT ' ' NOT NULL,
FMESSAGEFIELD NVARCHAR(50) DEFAULT ' ' NOT NULL,
FCHECKOP NVARCHAR(50) DEFAULT ' ' NOT NULL,
FLANDINGOP NVARCHAR(50) DEFAULT ' ' NOT NULL,
FCHECKENTITYID NVARCHAR(50) DEFAULT ' ' NOT NULL,
FCTRLTYPE NVARCHAR(30) DEFAULT ' ' NOT NULL,
FFAILMESSAGE NVARCHAR(255) DEFAULT ' ' NOT NULL,
FCHECKOPNAME NVARCHAR(50) DEFAULT ' ' NOT NULL,
FLANDINGOPNAME NVARCHAR(50) DEFAULT ' ' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_FCS_SUSPECTSET_L')
 CREATE TABLE T_FCS_SUSPECTSET_L (
FPKID NVARCHAR(30) DEFAULT ' ' NOT NULL,
FID BIGINT DEFAULT 0 NOT NULL,
FCOMMENT NVARCHAR(255) DEFAULT ' ' NOT NULL,
FLOCALEID NVARCHAR(30) DEFAULT ' ' NOT NULL,
FNAME NVARCHAR(255) DEFAULT ' ' NOT NULL,
FFAILMESSAGE NVARCHAR(255) DEFAULT ' ' NOT NULL,
FCHECKOPNAME NVARCHAR(50) DEFAULT ' ' NOT NULL,
FLANDINGOPNAME NVARCHAR(50) DEFAULT ' ' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_FCS_SUSPECTSET_M')
 CREATE TABLE T_FCS_SUSPECTSET_M (
FID BIGINT DEFAULT 0 NOT NULL,
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FSEQ BIGINT DEFAULT 0 NOT NULL,
FMATCHSCHEME NVARCHAR(50) DEFAULT ' ' NOT NULL,
FDESTFILTER NVARCHAR(50) DEFAULT ' ' NOT NULL,
FCHECKFILTER NVARCHAR(50) DEFAULT ' ' NOT NULL,
FMATCHRECORD NVARCHAR(255) DEFAULT ' ' NOT NULL,
FMATCHRECORD_TAG NCLOB,
FDESTFILTERRECORD NVARCHAR(255) DEFAULT ' ' NOT NULL,
FDESTFILTERRECORD_TAG NCLOB,
FCHECKFILTERRECORD NVARCHAR(255) DEFAULT ' ' NOT NULL,
FCHECKFILTERRECORD_TAG NCLOB
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_FCS_SUSPECTBILL')
 CREATE TABLE T_FCS_SUSPECTBILL (
FID BIGINT DEFAULT 0 NOT NULL,
FBILLNO NVARCHAR(30) DEFAULT ' ' NOT NULL,
FBILLSTATUS NVARCHAR(30) DEFAULT ' ' NOT NULL,
FCREATORID BIGINT DEFAULT 0 NOT NULL,
FMODIFIERID BIGINT DEFAULT 0 NOT NULL,
FAUDITORID BIGINT DEFAULT 0 NOT NULL,
FAUDITDATE DATETIME,
FMODIFYTIME DATETIME,
FCREATETIME DATETIME,
FBILLENTITYID NVARCHAR(50) DEFAULT ' ' NOT NULL,
FCONFIRM CHAR(1) DEFAULT '0' NOT NULL,
FBILLID BIGINT DEFAULT 0 NOT NULL,
FCTRLTYPE NVARCHAR(30) DEFAULT ' ' NOT NULL,
FUPRECORDCONFIRM CHAR(1) DEFAULT '0' NOT NULL,
FDESTDESCRIBE NVARCHAR(2000) DEFAULT ' ' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_FCS_SUSPECTBILL_L')
 CREATE TABLE T_FCS_SUSPECTBILL_L (
FPKID NVARCHAR(30) DEFAULT ' ' NOT NULL,
FID BIGINT DEFAULT 0 NOT NULL,
FLOCALEID NVARCHAR(30) DEFAULT ' ' NOT NULL,
FDESTDESCRIBE NVARCHAR(2000) DEFAULT ' ' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_FCS_SUSPECTBILL_S')
 CREATE TABLE T_FCS_SUSPECTBILL_S (
FID BIGINT DEFAULT 0 NOT NULL,
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FSEQ BIGINT DEFAULT 0 NOT NULL,
FSUSPECTBILLNO NVARCHAR(50) DEFAULT ' ' NOT NULL,
FSUSPECTBILLENTITYID NVARCHAR(50) DEFAULT ' ' NOT NULL,
FSUSPECTBILLID BIGINT DEFAULT 0 NOT NULL,
FSUSPECTDATE DATETIME,
FSUSPECTDESCRIBE NVARCHAR(2000) DEFAULT ' ' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_FCS_SUSPECTBILL_S_L')
 CREATE TABLE T_FCS_SUSPECTBILL_S_L (
FPKID NVARCHAR(30) DEFAULT ' ' NOT NULL,
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FLOCALEID NVARCHAR(30) DEFAULT ' ' NOT NULL,
FSUSPECTDESCRIBE NVARCHAR(2000) DEFAULT ' ' NOT NULL
);



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