![]() |
#8 |
Ищущий знания...
|
можно сделать одним запросом
![]() X++: select firstonly NewPrice from RetailItemPriceHistory order by NewPrice where RetailItemPriceHistory.ItemId == itemId && RetailItemPriceHistory.InventLocationId == InventLocationId && RetailItemPriceHistory.TransDate >= "05.01.2011" && RetailItemPriceHistory.TransDate <= "20.02.2011" && RetailItemPriceHistory.NewPrice join firstonly NewPrice from RetailItemPriceHistory2 order by TransDate desc where RetailItemPriceHistory2.ItemId == RetailItemPriceHistory.ItemId && RetailItemPriceHistory2.InventLocationId == RetailItemPriceHistory.InventLocationId && RetailItemPriceHistory2.TransDate < "05.01.2011"; return min(RetailItemPriceHistory.NewPrice, RetailItemPriceHistory2.NewPrice);
__________________
"Страх перед возможностью ошибки не должен отвращать нас от поисков истины." (с) С Уважением, Елизаров Артем |
|
Теги |
retailitempricehistory, запрос (query) |
|
![]() |
||||
Тема | Ответов | |||
Поиск набором в выпадающем списке.. | 0 | |||
Поиск сотрудников по наименованию (ФИО) в AX 2009 | 12 | |||
"поиск" | 6 | |||
Поиск по подстроке | 8 | |||
Поиск по полю временной таблицы | 2 |
Опции темы | Поиск в этой теме |
Опции просмотра | |
|