i had an issue some months Back and i got a response.
The issue is that i was experiencing Double Qty some times back and i used DISTINCT to correct this and it worked for sometime only for me to realize now that there are still some occurences of the Duplicate item qty.
Please any idea on how to resolve this.
SQL SELECT DISTINCT
TO_CHAR(q.ITEM_SID) AS "ITEM_SID",
q.SBS_NO AS "SBS_NO",
q.STORE_NO AS "STORE_NO",
q.QTY as "OH_QTY",
q.MIN_QTY as "MIN_QTY",
q.MAX_QTY as "MAX_QTY",
q.TRANSFER_IN_QTY as "TRANS_IN",
q.TRANSFER_OUT_QTY as "TRANS_OUT",
(n.COST * q.QTY) AS "EXT_COST"
FROM INVN_SBS_QTY q
INNER JOIN INVN_SBS n ON n.ITEM_SID = q.ITEM_SID
WHERE q.STORE_NO < 250 AND q.SBS_NO in $(subsidiaries);