/**Begin E:\NextERP_PDM\PDM_UPGRADE\PDMS\branch_lastest\pdm\BASE_constraint.sql **/
 EXEC P_ALTERPK 'PK_T_BD_SUBELEMENT_MATERIAL', 'T_BD_SUBELEMENT_MATERIAL', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'INDEX_BD_SUBELEMAT_FSBELEID') CREATE INDEX INDEX_BD_SUBELEMAT_FSBELEID ON T_BD_SUBELEMENT_MATERIAL ( FSUBELEMENTID ,FMATERIALID );


 EXEC P_ALTERPK 'PK_T_BD_SUBELEMENTENTRY', 'T_BD_SUBELEMENTENTRY', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'INDEX_BD_SUBELEMENTENTRY') CREATE INDEX INDEX_BD_SUBELEMENTENTRY ON T_BD_SUBELEMENTENTRY ( FSUBELEMENTID ,FCOSTTYPEID ,FEXPENSEITEMID );



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