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

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


 EXEC P_ALTERPK 'PK_T_BD_PRODUCTGROUP_L', 'T_BD_PRODUCTGROUP_L', 'FPKID', '1';

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

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