/**Begin E:\NextERP_PDM\PDM_UPGRADE\PDMS\branch_lastest\pdm\IM_constraint.sql **/
 EXEC P_ALTERPK 'PK_T_IM_PRICECONF', 'T_IM_PRICECONF', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_TABNAME = 'T_IM_PRICECONF' AND KSQL_INDNAME = 'IDX_IM_PRICECONF_NUM') CREATE INDEX IDX_IM_PRICECONF_NUM ON T_IM_PRICECONF ( FNUMBER );


 EXEC P_ALTERPK 'PK_T_IM_PRICECONF_AMOUNT', 'T_IM_PRICECONF_AMOUNT', 'FENTRYID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_TABNAME = 'T_IM_PRICECONF_AMOUNT' AND KSQL_INDNAME = 'IDX_IM_PRICECONF_AM_EID') CREATE INDEX IDX_IM_PRICECONF_AM_EID ON T_IM_PRICECONF_AMOUNT ( FID );


 EXEC P_ALTERPK 'PK_T_IM_PRICECONF_L', 'T_IM_PRICECONF_L', 'FPKID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_TABNAME = 'T_IM_PRICECONF_L' AND KSQL_INDNAME = 'IDX_IM_PRICECONF_L_ID') CREATE INDEX IDX_IM_PRICECONF_L_ID ON T_IM_PRICECONF_L ( FID ,FLOCALEID );


 EXEC P_ALTERPK 'PK_T_IM_PRICECONF_ORG', 'T_IM_PRICECONF_ORG', 'FENTRYID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_TABNAME = 'T_IM_PRICECONF_ORG' AND KSQL_INDNAME = 'IDX_IM_PRICECONF_ORG_ID') CREATE INDEX IDX_IM_PRICECONF_ORG_ID ON T_IM_PRICECONF_ORG ( FID );



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