Показать сообщение отдельно
Старый 07.08.2014, 16:11   #1  
Blog bot is offline
Blog bot
Участник
 
25,644 / 848 (80) +++++++
Регистрация: 28.10.2006
palleagermark: Check the SQL statement generated from a regular X++ select statement
Источник: http://www.agermark.com/2014/08/chec...ated-from.html
==============

So here is another small tip based on me reading Inside Microsoft Dynamics AX 2012 R3.

If you want to know what SQL statement the SQL Server query processor generates based on a regular X++ select statement, you can add to the keyord generateOnly to the statement an afterwards call the getSQLStatement method on the record buffer.

Example:
AccountingEvent accountingEvent;
SourceDocumentHeader sourceDocumentHeader;

select generateonly accountingEvent
join sourceDocumentHeader
where sourceDocumentHeader.RecId == accountingEvent.SourceDocumentHeader;

info (accountingEvent.getSQLStatement());
That turns out something like this:




Источник: http://www.agermark.com/2014/08/chec...ated-from.html
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору.