Hi.
OK I Can't think anything to do without creating a new dut I didn't get a go for that so I'm trying this "Please help on conditional join" that obviously will not work as I must check on every row of tblClientOrderItem.
Never mind, I wanted to ask about this conversation. Isn't using
JOIN VISTAVM.DBO.tblClientOrderItem COI
ON ...
AND (((LEN(TransT_strBarcodeRedemp)=20 ...
AND RIGHT(TransT_strBarcodeRedemp,7)
BETWEEN COI.lStartVoucherNumber AND COI.lStartVoucherNumber + COI.lQtySupplied - 1)
will have to check each value on tblClientOrderItem?
I mean even if i fix the indexes, wont' this have to compare each tblClientOrderItem value thus comparing millions of rows?
I just can't grasp this.
thanks.