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

 
 
Опции темы Поиск в этой теме Опции просмотра
Старый 04.12.2012, 16:05   #6  
kashperuk is offline
kashperuk
Участник
Аватар для kashperuk
MCBMSS
Соотечественники
Сотрудники Microsoft Dynamics
Лучший по профессии 2017
Лучший по профессии 2015
Лучший по профессии 2014
Лучший по профессии 2011
Лучший по профессии 2009
 
4,361 / 2084 (78) +++++++++
Регистрация: 30.05.2004
Адрес: Atlanta, GA, USA
I would suggest that you add a larger sample data set, so that we can better understand your problem statement.

Or at least confirm that my understanding of what you wrote is correct:

1. For any PO of type "P", there's exactly one corresponding PO of type "D", that is linked to it through the InventSiteId field on the PO table
2. There can be multiple POs of type "P" for the same "D" PO, so for example P1 linked to D1 and P2 linked to D1.
3. You want to create a query that would select all POs of type "P" and their respective "D" POs.
4. You want to do it with just 1 query.

My suggestion would be:

X++:
PO poP;
PO poD;
while select PurchId from poP
where poP.PurchaseType == "P"
join PurchID from poD
where poD.PurchaseType == "D"
&& poD.InventSiteId == poP.InventSiteId
{
info(strfmt("'P' PO: %1, 'D' PO: %2", poP.PurchId, poD.PurchId));
}
 

Похожие темы
Тема Автор Раздел Ответов Посл. сообщение
axforum blogs: Квест: Подружим Dynamics Ax 2009 Sp1 RU7 c SharePoint Foundation 2010 Blog bot DAX Blogs 4 16.10.2017 17:50
emeadaxsupport: New Content for Microsoft Dynamics AX 2012 : October 2011 Blog bot DAX Blogs 0 27.10.2011 17:11
axinthefield: Dynamics AX Event IDs Blog bot DAX Blogs 0 01.03.2011 22:11
Sample Design Patterns: Upgrade to Microsoft Dynamics AX 2009 and issues with the global address book Blog bot DAX Blogs 0 21.12.2010 11:11
Arijit Basu: AX 2009 - Quick Overview Blog bot DAX Blogs 4 19.05.2008 14:47

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

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

Рейтинг@Mail.ru
Часовой пояс GMT +3, время: 06:24.