-- 采购入库单、销售出库单核销单据编号增加索引
 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'DX_IM_PIBILLENTRY_R_MAININUM') CREATE INDEX DX_IM_PIBILLENTRY_R_MAININUM ON T_IM_PURINBILLENTRY_R ( FMAINBILLNUMBER );
 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_IM_SOBILLENTRY_R_MAINNUM') CREATE INDEX IDX_IM_SOBILLENTRY_R_MAINNUM ON T_IM_SALOUTBILLENTRY_R ( FMAINBILLNUMBER );