/**Begin E:\NextERP_PDM\PDM_UPGRADE\PDMS\branch_lastest\pdm\EB_table.sql **/

IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_EB_ACCOUNTDIMENSION') 
CREATE TABLE T_EB_ACCOUNTDIMENSION (
FID                  BIGINT               NOT NULL DEFAULT 0,
FENTRYID             BIGINT               NOT NULL DEFAULT 0,
FDEFINDIMSENSION     BIGINT               NOT NULL DEFAULT 0,
FSEQ                 INT                  NOT NULL DEFAULT 0         
);

EXEC P_ALTERPK 'PK_EB_ACCOUNTDIMENSION', 'T_EB_ACCOUNTDIMENSION', 'FENTRYID', '1';

IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_EB_ACCTDIM')
CREATE INDEX IDX_EB_ACCTDIM ON T_EB_ACCOUNTDIMENSION (FDEFINDIMSENSION ASC);



/**End E:\NextERP_PDM\PDM_UPGRADE\PDMS\branch_lastest\pdm\EB_table.sql **/
