/**BEGIN  **/

IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_EB_DIMCOMB_MEMENTRY') 
 CREATE TABLE T_EB_DIMCOMB_MEMENTRY (
FID  BIGINT NOT NULL DEFAULT 0,
FENTRYID  BIGINT NOT NULL DEFAULT 0,
FSEQ INT NOT NULL DEFAULT 0,
FDIMENSIONID  BIGINT NOT NULL DEFAULT 0,
FDIMMEMBERTYPE CHAR(1) NOT NULL DEFAULT '1',
FMEMBERCLASSTYPE NVARCHAR(50) NOT NULL DEFAULT ' ',
FMEMBERID  BIGINT NOT NULL DEFAULT 0,
FDIMVIEWID  BIGINT NOT NULL DEFAULT 0
);

EXEC P_ALTERPK 'PK_T_EB_DIMCOMB_MEMENTRY', 'T_EB_DIMCOMB_MEMENTRY', 'FENTRYID', '1';

IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IX_T_EB_DIMCOMB_MEMENTRY_ID')
CREATE INDEX IX_T_EB_DIMCOMB_MEMENTRY_ID ON T_EB_DIMCOMB_MEMENTRY ( FID );

/**END **/