troubleshooting Question

X++ Convert to SQL

Avatar of Zack
ZackFlag for Australia asked on
Microsoft DynamicsSQL
2 Comments1 Solution10 ViewsLast Modified:
Hi EE,

I have the following X++ query:

While Select SalesId, SalesName, PurchOrderFormNum from salesTable
join InvoiceAccount, InvoiceDate, invoiceId, SalesId, CurrencyCode, SalesBalance from custInvoiceJour
where salesTable.SalesId == custInvoiceJour.SalesId
&& custInvoiceJour.InvoiceAccount == custVendPaym.ledgerJournalTrans().AccountNum
Exists Join custTrans
where custTrans.Invoice == custInvoiceJour.InvoiceId
&& custTrans.AccountNum == custInvoiceJour.InvoiceAccount
&& custTrans.TransDate == custInvoiceJour.InvoiceDate
Exists join custTransOpen
where custTransOpen.AccountNum == custTrans.AccountNum
&& custTransOpen.RefRecId == custTrans.RecId
Exists join specTrans
where specTrans.RefCompany == custTransOpen.dataAreaId
&& specTrans.RefTableId == custTransOpen.TableId
&& specTrans.RefRecId == custTransOpen.RecId
Exists join ledgerJournalTrans
where specTrans.SpecCompany == ledgerJournalTrans.dataAreaId
&& specTrans.SpecRecId == ledgerJournalTrans.RecId
&& specTrans.SpecTableId == LedgerJournalTrans.TableId
&& ledgerJournalTrans.AccountNum == custVendPaym.ledgerJournalTrans().AccountNum

How would I convert this to SQL? Any assistance is appreciated. 

Thank you
Damon Repton
Dynamics Technical Architect

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 2 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 2 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros