Hi, I'm trying to retrieve order number, status, customer#, customer name from our order master and customer master when the customer is on our preferred customer file. This runs but returns nothing when it should. Where am I going wrong? Note: CXSPRF is a preferred level then multiple customer are assigned to it. So I want all custest1 level where the customer number from the order master is assigned to it and active.
from CORDER a, CUSTMST b
where a.CHOCUS = b.CCNUM
and (a.CHODTE between 20190101 and 20190931)
(SELECT * FROM CCXCPRF c WHERE ((c.CXSPRF = 'CUSTEST1' AND
a.CHOCUS = c.CXSCUS) AND
c.CXSSTS = 'A'))
Thank you in advance!!