public inbox for [email protected]
help / color / mirror / Atom feedFrom: Geoff Winkless <[email protected]>
To: Anthony Apollis <[email protected]>
Cc: [email protected]
Subject: Re: TSQL To Postgres - Unpivot/Union All
Date: Thu, 20 Jul 2023 15:51:35 +0100
Message-ID: <CAEzk6fcfXk_-UweJZ_hFWecDAs_0ECd27Q_r_=o1V78k5xBBuA@mail.gmail.com> (raw)
In-Reply-To: <CAJyMCYJDiY6hoLdtM=T2nc8rnZTxBbNOr0mHsJ5v6OPtes6B0Q@mail.gmail.com>
References: <CAJyMCYJ+JGpHtpV36UP+kUAW4LoprmgbgDPLCpe_8A0xbe=GZA@mail.gmail.com>
<CAJyMCYLL-mMuCfXT8M1kD-=6=r8YHHrSGbT-rN25vCwtVyr1jg@mail.gmail.com>
<CAEzk6ffszUabGjDhBOCZqTP0PoMzLaJtnu+=ye2snMVSOy=b4w@mail.gmail.com>
<CAJyMCYLvymAS+7DoiHGs2zHKGigQj7waGzdXWbo+3xBUzi4Mew@mail.gmail.com>
<CAJyMCYJDiY6hoLdtM=T2nc8rnZTxBbNOr0mHsJ5v6OPtes6B0Q@mail.gmail.com>
On Thu, 20 Jul 2023 at 15:28, Anthony Apollis <[email protected]> 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
view thread (8+ messages) latest in thread
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected], [email protected]
Subject: Re: TSQL To Postgres - Unpivot/Union All
In-Reply-To: <CAEzk6fcfXk_-UweJZ_hFWecDAs_0ECd27Q_r_=o1V78k5xBBuA@mail.gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox