/**Begin D:\PDM_UPGRADE\PDM1\FCS_table.sql **/
IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_FCS_SUSPECTLOG')
 CREATE TABLE T_FCS_SUSPECTLOG (
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,
FCOSTTIME INT DEFAULT 0 NOT NULL,
FEXCEPTION NVARCHAR(255) DEFAULT ' ' NOT NULL,
FEXCEPTION_TAG NCLOB,
FTRACEID NVARCHAR(80) DEFAULT ' ' NOT NULL,
FLOGTYPE NVARCHAR(30) DEFAULT ' ' NOT NULL,
FREPEATSETID BIGINT DEFAULT 0 NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_FCS_SUSPECTLOG_ENTRY')
 CREATE TABLE T_FCS_SUSPECTLOG_ENTRY (
FID BIGINT DEFAULT 0 NOT NULL,
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FSEQ BIGINT DEFAULT 0 NOT NULL,
FDESTBILLTYPE NVARCHAR(80) DEFAULT ' ' NOT NULL,
FDESTBILLID BIGINT DEFAULT 0 NOT NULL,
FDESTNUMBER NVARCHAR(80) DEFAULT ' ' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_FCS_SUSPECTLOG_ENTRY_H')
 CREATE TABLE T_FCS_SUSPECTLOG_ENTRY_H (
FID BIGINT DEFAULT 0 NOT NULL,
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FSEQ BIGINT DEFAULT 0 NOT NULL,
FDESTBILLTYPE NVARCHAR(80) DEFAULT ' ' NOT NULL,
FDESTBILLID BIGINT DEFAULT 0 NOT NULL,
FDESTNUMBER NVARCHAR(80) DEFAULT ' ' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_FCS_SUSPECTLOG_H')
 CREATE TABLE T_FCS_SUSPECTLOG_H (
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,
FCOSTTIME INT DEFAULT 0 NOT NULL,
FEXCEPTION NVARCHAR(255) DEFAULT ' ' NOT NULL,
FEXCEPTION_TAG NCLOB,
FTRACEID NVARCHAR(80) DEFAULT ' ' NOT NULL,
FLOGTYPE NVARCHAR(30) DEFAULT ' ' NOT NULL,
FREPEATSETID BIGINT DEFAULT 0 NOT NULL
);

 EXEC p_AlterColumn 'T_FCS_SUSPECTSET', 'FCHECKOP', 'NVARCHAR(255)', 'NOT NULL', '0100', ''' ''';

 EXEC p_AlterColumn 'T_FCS_SUSPECTSET', 'FLANDINGOP', 'NVARCHAR(255)', 'NOT NULL', '0100', ''' ''';

 EXEC p_AlterColumn 'T_FCS_SUSPECTSET', 'FCHECKOPNAME', 'NVARCHAR(255)', 'NOT NULL', '0100', ''' ''';

 EXEC p_AlterColumn 'T_FCS_SUSPECTSET', 'FLANDINGOPNAME', 'NVARCHAR(255)', 'NOT NULL', '0100', ''' ''';

 EXEC p_AlterColumn 'T_FCS_SUSPECTSET_L', 'FCHECKOPNAME', 'NVARCHAR(255)', 'NOT NULL', '0100', ''' ''';

 EXEC p_AlterColumn 'T_FCS_SUSPECTSET_L', 'FLANDINGOPNAME', 'NVARCHAR(255)', 'NOT NULL', '0100', ''' ''';


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