AXForum  
Вернуться   AXForum > Microsoft Dynamics AX > DAX Blogs
All
Забыли пароль?
Зарегистрироваться Правила Справка Пользователи Сообщения за день Поиск

 
 
Опции темы Поиск в этой теме Опции просмотра
Старый 19.07.2012, 18:11   #1  
Blog bot is offline
Blog bot
Участник
 
25,475 / 846 (79) +++++++
Регистрация: 28.10.2006
ax-erp: Get underlying SQL query using getSQLStatement [Dynamics AX 2012]
Источник: http://microsoft-dynamics-ax-erp.blo...ery-using.html
==============


Friends,
To get the underlying SQL query or statement from the X++ query, use getSQLStatement method. getSQLStatement is a new method that has been introduced in tables in AX 2012.
The X++ select has been extended with the generateonly command that instructs the underlying data access framework to generate the SQL query without actually executing it.
staticvoid SR_getSQLStatement(Args _args)
{
CustTable custTable;
CustTrans custTrans;
;

selectgenerateonlyfirstOnly AccountNum, CustGroup
from custTable join custTrans where custTrans.AccountNum == custTable.AccountNum;

info(custTable.getSQLStatement());


}

Below is the SQL query.



Simple but very useful for developers for trouble shooting or to use it on reports.



Источник: http://microsoft-dynamics-ax-erp.blo...ery-using.html
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору.
Теги
ax2012, sql

 

Похожие темы
Тема Автор Раздел Ответов Посл. сообщение
dynamics-community.at: Fehlerbehebung bei Installation der AX 2012 Reporting Extensions mit SQL Server 2012 Blog bot DAX auf Deutsch 0 06.07.2012 18:11
dynamics-community.at: Dynamics AX 2012 Trainings Blog bot DAX auf Deutsch 0 19.06.2012 18:11
Dynamics AX Sustained Engineering: Announcing Compatibility Certification of SQL Server 2012 with Dynamics AX 2012 Blog bot DAX Blogs 0 16.03.2012 07:11
Microsoft Dynamics CRM Team Blog: Microsoft Dynamics CRM and SQL Server 2012 - Better Together Blog bot Dynamics CRM: Blogs 0 08.03.2012 04:32
dynamics-ax: Modeling the world, with Microsoft Dynamics AX 2012 Blog bot DAX Blogs 0 25.01.2011 09:11

Ваши права в разделе
Вы не можете создавать новые темы
Вы не можете отвечать в темах
Вы не можете прикреплять вложения
Вы не можете редактировать свои сообщения

BB коды Вкл.
Смайлы Вкл.
[IMG] код Вкл.
HTML код Выкл.
Быстрый переход

Рейтинг@Mail.ru
Часовой пояс GMT +3, время: 14:18.
Powered by vBulletin® v3.8.5. Перевод: zCarot
Контактная информация, Реклама.