Answer the question
In order to leave comments, you need to log in
How to select data from the information register up to a specific registrar?
Hello. How can you select from the register of information (subordinate to the registrar, periodicity according to the position of the registrar) a slice of the latest BEFORE the position of the current registrar?
Answer the question
In order to leave comments, you need to log in
As a period in the request to the virtual table of the last slice, pass the border with the "Excluding" type, and as the first parameter, pass the moment of time received from your link.
In general, something like:
ДокументСсылка = Документы.УстановкаЦенНоменклатуры.НайтиПоНомеру("");
Запрос = Новый Запрос;
Запрос.УстановитьПараметр("Граница", Новый Граница(ДокументСсылка.МоментВремени(), ВидГраницы.Исключая));
Запрос.Текст =
"ВЫБРАТЬ
| ЦеныНоменклатурыСрезПоследних.Номенклатура КАК Номенклатура,
| ЦеныНоменклатурыСрезПоследних.ТипЦен КАК ТипЦен,
| ЦеныНоменклатурыСрезПоследних.Цена КАК Цена
|ИЗ
| РегистрСведений.ЦеныНоменклатуры.СрезПоследних(&Граница, ) КАК ЦеныНоменклатурыСрезПоследних";
I did this for the price. I needed the last price and the penultimate one.
in the query , you need to select both, and in the links you need to set that the cutoff period is not equal to the period of the last price. I'll post a request, it might help.
pastebin
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question