/**Begin E:\NextERP_PDM\PDM_UPGRADE\PDMS\branch_lastest\pdm\IM_constraint.sql **/
 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_IM_TRANSOUTBILL_E_OOW') CREATE INDEX IDX_IM_TRANSOUTBILL_E_OOW ON T_IM_TRANSOUTBILLENTRY ( FOUTOWNERID );

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_IM_TRANSDIRBILL_E_OOW') CREATE INDEX IDX_IM_TRANSDIRBILL_E_OOW ON T_IM_TRANSDIRBILLENTRY ( FOUTOWNERID );

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_IM_PURRECBILL_E_WH') CREATE INDEX IDX_IM_PURRECBILL_E_WH ON T_IM_PURRECBILLENTRY ( FWAREHOUSEID );

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_IM_PURRECBILL_E_OW') CREATE INDEX IDX_IM_PURRECBILL_E_OW ON T_IM_PURRECBILLENTRY ( FOWNERID );

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_IM_PURRECBILL_SUPP') CREATE INDEX IDX_IM_PURRECBILL_SUPP ON T_IM_PURRECBILL ( FSUPPLIERID );

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_IM_PBILL_SUPP') CREATE INDEX IDX_IM_PBILL_SUPP ON T_IM_PURINBILL ( FSUPPLIERID );

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_IM_SOBILL_CUSTM') CREATE INDEX IDX_IM_SOBILL_CUSTM ON T_IM_SALOUTBILL ( FCUSTOMERID );


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