The other day I had a customer ask me for a query that would find Part Routing records the did not include a specific workcenter. I provided this snippet to help. This query selects the set that includes both(or all depending) work centers then “excepts” or removes the ones that contain “Work Center A”.
USE ExactMAX(DN Name Here)
Select prtnum_12
from Part_Routing
where WRKCTR_12 IN (‘Work Center A’, ‘ Work Center B’)
Except
(select prtnum_12
from Part_Routing
where wrkctr_12 = ‘ Work Center A’)