/**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_REPORTSHARE_L') 
CREATE TABLE T_EB_REPORTSHARE_L (
   FPKID                BIGINT                         DEFAULT 0 NOT NULL,
   FID                  BIGINT                         DEFAULT 0 NOT NULL,
   FLOCALEID            NVARCHAR(10)                   DEFAULT ' ' NOT NULL,
   FNAME                NVARCHAR(100)                  DEFAULT ' ' NOT NULL
);

 EXEC P_ALTERPK 'PK_EB_REPORTSHARE_L', 'T_EB_REPORTSHARE_L', 'FPKID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_EB_REPORTSHARE_L') CREATE INDEX IDX_EB_REPORTSHARE_L ON T_EB_REPORTSHARE_L ( FID ,FLOCALEID );


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