/**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_MOBILL_BKTORGNO') CREATE INDEX IDX_IM_MOBILL_BKTORGNO ON T_IM_MREQOUTBILL ( FBOOKDATE ,FORGID ,FBILLNO );

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_IM_ADJBILL_BKTORGNO') CREATE INDEX IDX_IM_ADJBILL_BKTORGNO ON T_IM_ADJUSTBILL ( FBOOKDATE ,FORGID ,FBILLNO );

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_IM_ASSBILL_BKTORGNO') CREATE INDEX IDX_IM_ASSBILL_BKTORGNO ON T_IM_ASSEMBBILL ( FBOOKDATE ,FORGID ,FBILLNO );

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_IM_DSBILL_BKTORGNO') CREATE INDEX IDX_IM_DSBILL_BKTORGNO ON T_IM_DISASSEMBLEBILL ( FBOOKDATE ,FORGID ,FBILLNO );

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_IM_PIBILL_BKTORGNO') CREATE INDEX IDX_IM_PIBILL_BKTORGNO ON T_IM_PRODUCTINBILL ( FBOOKDATE ,FORGID ,FBILLNO );

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_IM_TOBILL_BKTORGNO') CREATE INDEX IDX_IM_TOBILL_BKTORGNO ON T_IM_TRANSOUTBILL ( FBOOKDATE ,FORGID ,FBILLNO );

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_IM_TIBILL_BKTORGNO') CREATE INDEX IDX_IM_TIBILL_BKTORGNO ON T_IM_TRANSINBILL ( FBOOKDATE ,FORGID ,FBILLNO );

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_IM_OIBILL_BKTORGNO') CREATE INDEX IDX_IM_OIBILL_BKTORGNO ON T_IM_OTHERINBILL ( FBOOKDATE ,FORGID ,FBILLNO );

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_IM_LTBILL_BKTORGNO') CREATE INDEX IDX_IM_LTBILL_BKTORGNO ON T_IM_LOCATIONTRANSFER ( FBOOKDATE ,FORGID ,FBILLNO );

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_IM_TDBILL_BKTORGNO') CREATE INDEX IDX_IM_TDBILL_BKTORGNO ON T_IM_TRANSDIRBILL ( FBOOKDATE ,FORGID ,FBILLNO );

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_IM_INITBILL_BKTORGNO') CREATE INDEX IDX_IM_INITBILL_BKTORGNO ON T_IM_INITBILL ( FBOOKDATE ,FORGID ,FBILLNO );

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_IM_PRBILL_BKTORGNO') CREATE INDEX IDX_IM_PRBILL_BKTORGNO ON T_IM_PURRECBILL ( FBOOKDATE ,FORGID ,FBILLNO );

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_IM_PURINBILL_BKTORGNO') CREATE INDEX IDX_IM_PURINBILL_BKTORGNO ON T_IM_PURINBILL ( FBOOKDATE ,FORGID ,FBILLNO );

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_IM_SOBILL_BKTORGNO') CREATE INDEX IDX_IM_SOBILL_BKTORGNO ON T_IM_SALOUTBILL ( FBOOKDATE ,FORGID ,FBILLNO );

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_IM_OOBILL_BKTORGNO') CREATE INDEX IDX_IM_OOBILL_BKTORGNO ON T_IM_OTHEROUTBILL ( FBOOKDATE ,FORGID ,FBILLNO );


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