/**Begin E:\NextERP_PDM\PDM_UPGRADE\PDMS\branch_lastest\pdm\IM_constraint.sql **/
 EXEC P_ALTERPK 'PK_IM_PURINBILLENTRY_L', 'T_IM_PURINBILLENTRY_L', 'FPKID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_IM_PURINBILLE_L_ID_LOCAL') CREATE INDEX IDX_IM_PURINBILLE_L_ID_LOCAL ON T_IM_PURINBILLENTRY_L ( FENTRYID ,FLOCALEID );


 EXEC P_ALTERPK 'PK_IM_PURRECBILLENTRY_L', 'T_IM_PURRECBILLENTRY_L', 'FPKID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_IM_PURRECBILLE_L_ID_LOCAL') CREATE INDEX IDX_IM_PURRECBILLE_L_ID_LOCAL ON T_IM_PURRECBILLENTRY_L ( FENTRYID ,FLOCALEID );


 EXEC P_ALTERPK 'PK_IM_SALOUTBILLENTRY_L', 'T_IM_SALOUTBILLENTRY_L', 'FPKID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_IM_SALOUTBILLE_L_ID_LOCAL') CREATE INDEX IDX_IM_SALOUTBILLE_L_ID_LOCAL ON T_IM_SALOUTBILLENTRY_L ( FENTRYID ,FLOCALEID );



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