I have a problem with the below query. Basically the query below gives me all items from a ITEM_MASTER table, that are located at location '9999' from the ITEM_LOCATION table and that have a status of 'C' again in the ITEM_LOCATION table. I want to check if any of these items in the query below are also at any other location and have a status of 'A'.
So basically I want too cross reference the items from this query, to see if any of them also appear at any other location, not just 9999 and if they have a status of 'A'
SELECT IM.ITEM MIN,
IM.ITEM_DESC,
IL.ITEM MIN,
IL.LOC,
IL.STATUS
FROM ITEM_MASTER IM,ITEM_LOC IL
WHERE IM.ITEM_LEVEL = 2
AND IM.TRAN_LEVEL = 2
AND IL.STATUS = 'C'
AND IM.ITEM = IL.ITEM
AND IL.LOC = 9999;
Thanks!