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

 
 
Опции темы Поиск в этой теме Опции просмотра
Старый 22.03.2006, 12:04   #1  
Maxim Gorbunov is offline
Maxim Gorbunov
Administrator
Соотечественники
Лучший по профессии 2009
 
2,483 / 645 (26) +++++++
Регистрация: 27.11.2001
Адрес: Dubai, UAE
query, compare two fields (by link)
Цитата:
Posted on 21-Mar-2006 at microsoft.public.axapta.programming by link
i want to make a query in the form ProdTable to show all the records that the
SchedEndDate > Delievry date.
how can i do?
You can specify not just simple range values but query conditions involving two or more fields using QueryBuildRange::value() method. Axapta kernel will parse these conditions into SQL statement automatically. For example, in your case:
X++:
Query       query;
// ...
query = new Query();
query.addDataSource(tableNum(ProdTable))
     .addRange(fieldNum(ProdTable, SchedEnd))
     .value(strfmt("(%1 > %2)",
                   fieldStr(ProdTable, SchedEnd),
                   fieldStr(ProdTable, DlvDate)));

info(query.dataSourceNo(1).toString()); // prints the resulting sql statement
__________________
Not registered yet? Register here!
Have comments, questions, suggestions or anything else regarding our web site? Don't hesitate, send them to me
 

Похожие темы
Тема Автор Раздел Ответов Посл. сообщение
Dynamics AX: QueryRun and Query Objects - Binding operation failed to allocate buffer space Blog bot DAX Blogs 0 03.04.2009 08:05
palleagermark: Sample union query from AX 2009 Blog bot DAX Blogs 0 11.07.2008 20:05
gatesasbait: On Dynamics Ax 5.0 compare tool enhancements Blog bot DAX Blogs 3 29.11.2007 13:42
Dynamics AX Geek: Using query() Blog bot DAX Blogs 0 28.10.2006 16:40
Проблема с составлением Query axaLearner DAX: Программирование 10 01.12.2005 15:00

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

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

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