I need to convert the SQL query below into AX query
select * from PURCHRFQLINE a inner join PURCHRFQTABLE b on
a.RFQID=b.RFQID
inner join PURCHRFQREPLYLINE c
on c.RFQLINERECID=a.RECID
full outer join PURCHLINE d on d.Itemid=a.Itemid AND a.PURCHID = d.PURCHID
*This post is locked for comments
I need to build a query
Hi Guys
From my side, the above query work well.
I have also tested on my environment.
In this case we don't have a combination of inner join and outer join on the same source as write at the link bmdax.blogspot.nl/.../joins-inner-outer-combined.html
Regards
try to find an alternative query for FULL OUTER JOIN, combination of outer joins, unions
but i suppose it will not work in AX...
Hi Maram
Could be something like this :
PURCHRFQLINE PURCHRFQLINE;
PURCHRFQTABLE PURCHRFQTABLE;
PURCHRFQREPLYLINE PURCHRFQREPLYLINE;
PURCHLINE PURCHLINE;
;
while select PURCHRFQLINE
join PURCHRFQTABLE
where PURCHRFQLINE.RFQId == PURCHRFQTABLE.RFQId
join PURCHRFQREPLYLINE
Where PURCHRFQREPLYLINE.RFQLINERECID == PURCHRFQLINE.RECID
outer join PURCHLINE
Where PURCHLINE.Itemid == PURCHRFQLINE.Itemid
&& PURCHRFQLINE.PURCHID == PURCHLINE.PURCHID
info (PURCHRFQLINE.RFQId);
Regards
I need to create it firstly by code similar to the first example in the link for testing purposes then I will convert it to AOT query using the wizard
Hi Maram
AX query mean AOT query or using query objects like the examples on the link below ?
msdn.microsoft.com/.../aa638454.aspx
Regards
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,240 Super User 2024 Season 2
Martin Dráb 230,149 Most Valuable Professional
nmaenpaa 101,156