Reputation: 7170
This is related to a my previous question. I've a (not so) 'complex' query with 3 joined table. This is the query:
select somefield
from WMSTRANSPORT INNER join GMSWmslocationwrkctr On WMSTRANSPORT.TOLOCATION = GMSWMSLOCATIONWRKCTR.WMSLOCATIONID
inner join WMSLOCATIONSUM on WMSTRANSPORT.TOLOCATION = WMSLOCATIONSUM.WMSLOCATIONID
where
EXPEDITIONSTATUS=3 OR EXPEDITIONSTATUS =4
How to 'convert' into X++ code ?
Upvotes: 1
Views: 618
Reputation: 3469
Just change the ON clauses to WHERE clauses, use == instead of =, and use || instead of OR:
select somefield
from WMSTRANSPORT
where (WMSTRANSPORT.EXPEDITIONSTATUS==3 || WMSTRANSPORT.EXPEDITIONSTATUS==4)
join GMSWmslocationwrkctr where WMSTRANSPORT.TOLOCATION == GMSWMSLOCATIONWRKCTR.WMSLOCATIONID
join WMSLOCATIONSUM where WMSTRANSPORT.TOLOCATION == WMSLOCATIONSUM.WMSLOCATIONID
Upvotes: 2