Re: TSQL To Postgres - Unpivot/Union All

Поиск
Список
Период
Сортировка
От Geoff Winkless
Тема Re: TSQL To Postgres - Unpivot/Union All
Дата
Msg-id CAEzk6fcfXk_-UweJZ_hFWecDAs_0ECd27Q_r_=o1V78k5xBBuA@mail.gmail.com
обсуждение исходный текст
Ответ на Fwd: TSQL To Postgres - Unpivot/Union All  (Anthony Apollis <anthony.apollis@gmail.com>)
Ответы Re: TSQL To Postgres - Unpivot/Union All  (Anthony Apollis <anthony.apollis@gmail.com>)
Список pgsql-general
On Thu, 20 Jul 2023 at 15:28, Anthony Apollis <anthony.apollis@gmail.com> wrote:
> I am attaching my TSQL and Postgres SQL:

You're still missing some CREATEs, for example for temp_FieldFlowsFact.

Even assuming your columns list is correct, I would still (and as a
matter of habit) include the target column list in your INSERT
statements, if only to make your own life easier, but especially
because any later changes to the tables could end up shifting the
position of the columns.

Certainly it will be easier for anyone else trying to disentangle the SQL later.

As an aside, can you clarify whether you mean temporal tables (and are
you using a temporal tables extension)? Or should that read
"temporary"?

Geoff



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

Предыдущее
От: Laurenz Albe
Дата:
Сообщение: Re: How to improve the performance of my SQL query?
Следующее
От: Thomas Kellerer
Дата:
Сообщение: Re: Fwd: TSQL To Postgres - Unpivot/Union All