EXEC p_DropIdx 'IDX_IM_PRBL_FBNO', 'T_IM_PRODUCTINBILL';
EXEC p_DropIdx 'IDX_IM_SALEOUTBL_BILLNO', 'T_IM_SALOUTBILL';
EXEC p_DropIdx 'IDX_IM_PBILL_BILLNO', 'T_IM_PURINBILL';
IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_IM_PRBL_IDTN') CREATE INDEX IDX_IM_PRBL_IDTN ON T_IM_PRODUCTINBILL ( FORGID ,FBIZTIMES  DESC ,FBILLNO  DESC );
IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_IM_TRANSINBILL_BILLNO') CREATE INDEX IDX_IM_TRANSINBILL_BILLNO ON T_IM_TRANSINBILL ( FBILLNO );
IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_IM_TRANSOUTBILL_BILLNO') CREATE INDEX IDX_IM_TRANSOUTBILL_BILLNO ON T_IM_TRANSOUTBILL ( FBILLNO );
