Re: Bulk inserts into two (related) tables

Поиск
Список
Период
Сортировка
От Rich Shepard
Тема Re: Bulk inserts into two (related) tables
Дата
Msg-id alpine.LNX.2.20.1905211026000.6551@salmo.appl-ecosys.com
обсуждение исходный текст
Ответ на Re: Bulk inserts into two (related) tables  (Michael Lewis <mlewis@entrata.com>)
Ответы Re: Bulk inserts into two (related) tables  (Ron <ronljohnsonjr@gmail.com>)
Список pgsql-general
On Tue, 21 May 2019, Michael Lewis wrote:

> For each row-
> Insert into organizations table if the record does not exist, returning ID.
> Insert into people using that ID.

Michael,

The org_id will not exist until I run the insert script.

> Else, load all the data with empty ID column on person table,then just
> update the person table afterward and drop the org name column.

Then I'll copy the org_id numbers to the appropriate row(s) in the people
table.

Thanks,

Rich



В списке pgsql-general по дате отправления:

Предыдущее
От: Fabrízio de Royes Mello
Дата:
Сообщение: Re: Refresh Publication takes hours and doesn´t finish
Следующее
От: Rich Shepard
Дата:
Сообщение: Re: Bulk inserts into two (related) tables