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

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


 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_EB_PERIODVARIABLE_P2') CREATE INDEX IDX_EB_PERIODVARIABLE_P2 ON T_EB_PERIODVARIABLE ( FNUMBER );

 EXEC P_ALTERPK 'PK_T_EB_CURRCONVERTUPDATE', 'T_EB_CURRCONVERTUPDATE', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_EB_CURRCONVERTUPDATE_P1') CREATE INDEX IDX_EB_CURRCONVERTUPDATE_P1 ON T_EB_CURRCONVERTUPDATE ( FSCHEME );

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_EB_CURRCONVERTUPDATE_P2') CREATE INDEX IDX_EB_CURRCONVERTUPDATE_P2 ON T_EB_CURRCONVERTUPDATE ( FMODELID );


 EXEC P_ALTERPK 'PK_T_EB_DIMENSIONRELATION', 'T_EB_DIMENSIONRELATION', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_EB_DIMENSIONRELATION_P1') CREATE INDEX IDX_EB_DIMENSIONRELATION_P1 ON T_EB_DIMENSIONRELATION ( FMODELID );


 EXEC P_ALTERPK 'PK_T_EB_DIMMEMBERRELATION', 'T_EB_DIMMEMBERRELATION', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_EB_DIMMEMBERRELATION_P1') CREATE INDEX IDX_EB_DIMMEMBERRELATION_P1 ON T_EB_DIMMEMBERRELATION ( FRELATIONID );


 EXEC P_ALTERPK 'PK_T_EB_DIMRELATBUSIMODEL', 'T_EB_DIMRELATBUSIMODEL', 'FPKID', '1';

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



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