|
|
#21 |
|
Участник
|
Цитата:
![]() Цитата:
![]() Спасибо всем за помощь! |
|
|
|
|
#22 |
|
NavAx
|
может стоит добавить в таблицу поле "Дата окончания действия цены", заполнить его (и заполнять в будущем). И тогда задача упрощается.
|
|
|
|
|
#23 |
|
северный Будда
|
Эта может и упрощается. Зато появляется задача контроля интервалов дат - дабы в них не было разрывов
__________________
С уважением, Вячеслав |
|
|
|
|
#24 |
|
Administrator
|
А если так?
X++: FromDate fromDate = 05\01\2011; ToDate toDate = 20\02\2011; ItemId itemId = ...; InventLocationId inventLocationId = ... RetailItemPriceHistory retailItemPriceHistory; RetailItemPriceHistory retailItemPriceHistoryJoin; select minof(NewPrice) from retailItemPriceHistory where retailItemPriceHistory.ItemId == itemId && retailItemPriceHistory.InventLocationId == inventLocationId && retailItemPriceHistory.TransDate <= toDate notexists join retailItemPriceHistoryJoin where retailItemPriceHistoryJoin.ItemId == retailItemPriceHistory.ItemId && retailItemPriceHistoryJoin.InventLocationId == retailItemPriceHistory.InventLocationId && retailItemPriceHistoryJoin.TransDate > retailItemPriceHistory.TransDate && retailItemPriceHistoryJoin.TransDate <= fromDate;
__________________
Not registered yet? Register here! Have comments, questions, suggestions or anything else regarding our web site? Don't hesitate, send them to me |
|
|
| Теги |
| retailitempricehistory, запрос (query) |
|
|
Похожие темы
|
||||
| Тема | Ответов | |||
| Поиск набором в выпадающем списке.. | 0 | |||
| Поиск сотрудников по наименованию (ФИО) в AX 2009 | 12 | |||
| "поиск" | 6 | |||
| Поиск по подстроке | 8 | |||
| Поиск по полю временной таблицы | 2 | |||
|