/**Begin D:\PDM_UPGRADE\PDM1\HBSS_table.sql **/
IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_HBSS_SCORESYSTEM') 
 CREATE TABLE T_HBSS_SCORESYSTEM (
FID BIGINT DEFAULT 0 NOT NULL,
FNUMBER NVARCHAR(60) DEFAULT ' ' NOT NULL,
FCREATORID BIGINT DEFAULT 0 NOT NULL,
FORGID BIGINT DEFAULT 0 NOT NULL,
FUSEORGID BIGINT DEFAULT 0 NOT NULL,
FCTRLSTRATEGY VARCHAR(2) DEFAULT ' ' NOT NULL,
FSOURCEDATAID BIGINT DEFAULT 0 NOT NULL,
FBITINDEX INT DEFAULT 0 NOT NULL,
FINDEX INT DEFAULT 0 NOT NULL,
FSOURCEBITINDEX INT DEFAULT 0 NOT NULL,
FSIMPLENAME VARCHAR(50) DEFAULT ' ' NOT NULL,
FDESCRIPTION VARCHAR(255) DEFAULT ' ' NOT NULL,
FISSYSPRESET CHAR(1) DEFAULT '0' NOT NULL,
FDISABLERID BIGINT DEFAULT 0 NOT NULL,
FDISABLEDATE DATETIME,
FBOID BIGINT DEFAULT 0 NOT NULL,
FISCURRENTVERSION CHAR(1) DEFAULT ' ' NOT NULL,
FDATASTATUS VARCHAR(2) DEFAULT ' ' NOT NULL,
FSOURCEVID BIGINT DEFAULT 0 NOT NULL,
FFIRSTBSED DATETIME,
FCHANGEBSED DATETIME,
FBRED DATETIME,
FBRLED DATETIME,
FBRFD DATETIME,
FISMODIFY CHAR(1) DEFAULT ' ' NOT NULL,
FBSLED DATETIME,
FBSED DATETIME,
FCHANGEDESCRIPTION NVARCHAR(255) DEFAULT ' ' NOT NULL,
FHISVERSION VARCHAR(10) DEFAULT ' ' NOT NULL,
FVERSIONSOURCE VARCHAR(2) DEFAULT ' ' NOT NULL,
FCHANGETYPE VARCHAR(50) DEFAULT ' ' NOT NULL,
FMAXSCORE DECIMAL(19,6) DEFAULT 0 NOT NULL,
FMINSCORE DECIMAL(19,6) DEFAULT 0 NOT NULL,
FNAME VARCHAR(100) DEFAULT ' ' NOT NULL,
FSTATUS VARCHAR(2) DEFAULT 'C' NOT NULL,
FMODIFIERID BIGINT DEFAULT 0 NOT NULL,
FCREATETIME DATETIME,
FMODIFYTIME DATETIME,
FENABLE VARCHAR(2) DEFAULT '1' NOT NULL,
FMASTERID BIGINT DEFAULT 0 NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_HBSS_SCORESYSTEM_L') 
 CREATE TABLE T_HBSS_SCORESYSTEM_L (
FPKID VARCHAR(18) DEFAULT ' ' NOT NULL,
FID BIGINT DEFAULT 0 NOT NULL,
FLOCALEID VARCHAR(10) DEFAULT ' ' NOT NULL,
FNAME NVARCHAR(100) DEFAULT ' ' NOT NULL,
FSIMPLENAME NVARCHAR(100) DEFAULT ' ' NOT NULL,
FDESCRIPTION NVARCHAR(255) DEFAULT ' ' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_HBSS_SCORESYSTEMTAG') 
 CREATE TABLE T_HBSS_SCORESYSTEMTAG (
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FID BIGINT DEFAULT 0 NOT NULL,
FSEQ INT DEFAULT 0 NOT NULL,
FCOMMENT VARCHAR(255) DEFAULT ' ' NOT NULL,
FSCORE DECIMAL(19,6) DEFAULT 0 NOT NULL,
FTAG VARCHAR(50) DEFAULT ' ' NOT NULL,
FISDEFAULT CHAR(1) DEFAULT ' ' NOT NULL,
FENTRYBOID BIGINT DEFAULT 0 NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_HBSS_SCORESYSTEMTAG_L') 
 CREATE TABLE T_HBSS_SCORESYSTEMTAG_L (
FPKID VARCHAR(18) DEFAULT ' ' NOT NULL,
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FLOCALEID VARCHAR(10) DEFAULT ' ' NOT NULL,
FNAME NVARCHAR(100) DEFAULT ' ' NOT NULL,
FTAG NVARCHAR(50) DEFAULT ' ' NOT NULL,
FCOMMENT NVARCHAR(255) DEFAULT ' ' NOT NULL,
FENTRYBOID BIGINT DEFAULT 0 NOT NULL
);



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