D
D
Dmitry Krapivin2017-08-07 10:04:13
Database
Dmitry Krapivin, 2017-08-07 10:04:13

How to select by the nearest date from the departure records to the date of receipt and connect two database tables in 1s enterprise?

1. There are two selection tables, one contains data on when we received the nomenclature (equipment) and from where. The second table contains data on when the nomenclature left us and where. It is necessary to combine these two tables into one table, so that:
each receipt record corresponds to a record from another table about departure (by the nearest date of departure). There can be several records of departure from one organization.
Tell me, please, how, with what command (code) can you select data on departure by the nearest date of departure to the date of receipt?953fbcc5efaf4580abeb7010980ade2c.png

Answer the question

In order to leave comments, you need to log in

1 answer(s)
B
blugamire, 2017-08-07
@kiru

Новый Запрос("");
Place the cursor between the quotes and right-click on the "Query Builder" menu item.
Laba there.
You get in quotes a construction like

"ВЫБРАТЬ
  |	ПартииТоваровНаСкладах.Номенклатура,
  |	Продажи.ДокументПродажи
  |ИЗ
  |	РегистрНакопления.ПартииТоваровНаСкладах КАК ПартииТоваровНаСкладах
  |		ВНУТРЕННЕЕ СОЕДИНЕНИЕ РегистрНакопления.Продажи КАК Продажи
  |		ПО ПартииТоваровНаСкладах.Номенклатура = Продажи.Номенклатура"

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question