/**Begin E:\NextERP_PDM\PDM_UPGRADE\PDMS\branch_lastest\pdm\BCM_constraint.sql **/
 EXEC P_ALTERPK 'PK_T_BCM_ISGROUPSRCEXPRENTRY', 'T_BCM_ISGROUPSRCEXPRENTRY', 'FENTRYID', '1';

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


 EXEC P_ALTERPK 'PK_T_BCM_ISGROUPSRCMAPENTRY', 'T_BCM_ISGROUPSRCMAPENTRY', 'FENTRYID', '1';

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


 EXEC P_ALTERPK 'PK_T_BCM_ISGROUPTARGMAPENTRY', 'T_BCM_ISGROUPTARGMAPENTRY', 'FENTRYID', '1';

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


 EXEC P_ALTERPK 'PK_T_BCM_ISSINGLEMAP', 'T_BCM_ISSINGLEMAP', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_BCM_ISSINGLEMAP_DIMMAP') CREATE INDEX IDX_BCM_ISSINGLEMAP_DIMMAP ON T_BCM_ISSINGLEMAP ( FDIMMAPID );


 EXEC P_ALTERPK 'PK_T_BCM_ISSINGLEMAP_L', 'T_BCM_ISSINGLEMAP_L', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_T_BCM_ISSINGLEMAPENTRY', 'T_BCM_ISSINGLEMAPENTRY', 'FENTRYID', '1';

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




 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_BCM_ISGROUPMAP_DIMMAP') CREATE INDEX IDX_BCM_ISGROUPMAP_DIMMAP ON T_BCM_ISGROUPMAP ( FDIMMAPID );



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