/**Begin E:\NextERP_PDM\PDM_UPGRADE\PDMS\branch_lastest\pdm\EB_constraint.sql **/
 EXEC P_ALTERPK 'PK_T_EB_DIMENSIONRELATION_L', 'T_EB_DIMENSIONRELATION_L', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_T_EB_DIMENSIONVARIABLE_L', 'T_EB_DIMENSIONVARIABLE_L', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_T_EB_PERIODVARIABLE_L', 'T_EB_PERIODVARIABLE_L', 'FPKID', '1';

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



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