This example demonstrates how to convert X++ SQL code into equivalent SQL Server syntax. The original code aimed to sum the 'SumTax' field grouped by 'CurrencyCode' and included a join condition with the 'custInvoiceJourW' table.

Here's the converted SQL Server code:

SELECT SUM(SumTax) AS SumTax, CurrencyCode
FROM custInvoiceJour
JOIN custInvoiceJourW ON custInvoiceJourW.CustInvoiceJour = custInvoiceJour.RecId
WHERE custInvoiceJourW.CustConsInvoice_JP = this.RecId
GROUP BY CurrencyCode

This code performs the same function as the original X++ SQL code, but uses standard SQL Server syntax for better compatibility and readability.

X++ SQL to SQL Server Conversion: Summing Tax by Currency

原文地址: https://www.cveoy.top/t/topic/qDws 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录