/**Begin D:\PDM_UPGRADE\PDM1\EB_table.sql **/
IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_EB_RPTFUNCTION')
CREATE TABLE T_EB_RPTFUNCTION (
    FID BIGINT DEFAULT 0 NOT NULL,
    FMODIFIER BIGINT DEFAULT 0 NOT NULL,
    FMODIFYDATE DATETIME,
    FSHOWFIELDS  NVARCHAR(2000) DEFAULT ' ' NOT NULL,
    FMODEL BIGINT DEFAULT 0 NOT NULL,
    FBIZMODEL BIGINT DEFAULT 0 NOT NULL,
    FALLSTEPDATA  NVARCHAR(255) DEFAULT ' ' NOT NULL,
    FALLSTEPDATA_TAG NCLOB,
    FREFPARAMDIMNUMS NVARCHAR(500) DEFAULT ' ' NOT NULL,
    FREFFUNCTIONDIMNUMS NVARCHAR(500) DEFAULT ' ' NOT NULL,
    FNUMBER NVARCHAR(50) DEFAULT ' ' NOT NULL,
    FNAME NVARCHAR(50) DEFAULT ' ' NOT NULL,
    FTYPE NVARCHAR(30) DEFAULT ' ' NOT NULL,
    FDESCRIPTION NVARCHAR(80) DEFAULT ' ' NOT NULL
);

EXEC P_ALTERPK 'PK_T_EB_RPTFUNCTION', 'T_EB_RPTFUNCTION', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_EB_RPTFUNCTION_MODEL')
CREATE INDEX IDX_EB_RPTFUNCTION_MODEL ON T_EB_RPTFUNCTION (
FMODEL ASC,
FBIZMODEL ASC
);

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