I'm trying to query parts where there is no holds on them
The order number (sopnumbe) and parts itemnmbr) are in a table sop10200
and the holds (delete1) are in table sop10104. A hold in sop10104 is where delete1='0'
Since the holds table (sop10104) can have multiple holds I need to join on the distinct results of sop10104 where delete1<>'0'
when I run the below query I get a "The multi-part identifier "sop2.sopnumbe" could not be bound."
For the life of me I can't see where the issue lies.
from sop10200 sop2
join (select distinct(sopnumbe) from sop10104 sop4a
and sop4a.sopnumbe=sop2.sopnumbe) sop4