Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qMUAs-002Vuj-GZ for pgsql-general@arkaria.postgresql.org; Thu, 20 Jul 2023 13:58:34 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1qMUAq-008Ho5-9q for pgsql-general@arkaria.postgresql.org; Thu, 20 Jul 2023 13:58:32 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qMUAp-008Hmg-Lk for pgsql-general@lists.postgresql.org; Thu, 20 Jul 2023 13:58:31 +0000 Received: from mail-ej1-f50.google.com ([209.85.218.50]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1qMUAg-000Vie-Ea for pgsql-general@lists.postgresql.org; Thu, 20 Jul 2023 13:58:29 +0000 Received: by mail-ej1-f50.google.com with SMTP id a640c23a62f3a-991c786369cso142643666b.1 for ; Thu, 20 Jul 2023 06:58:22 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689861500; x=1690466300; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=sOgklmBpRwFtgMXpqwGiGvyPuJLxnfEMITL5J/qnt5o=; b=J55tyTWU8p2uoAzZiufB1OuO335TE+nLvcO1PN8p1eDBbBFq3kDY6Rf1p21+IdPyAM N/0eqQ8nwJH13rZPMRqdKsGDVNmR31v1AWXIofwmt6j6C+hsib+Z7eQUbeNn4nyN9eLb p1tBlKWdu83KjB4sioiW/I2joJvR8wGmmOQGyG2cN8nz4peScFIOJGSaSBJnfX85yGu0 Adj2ARNlCjS9nFVLKHDXmjwrejLrMcuOhkWiDF/KNLBU78xx/pOYT+2AsVXHVtWAJpyA nih+f7A9aieN6Zy+jXmo27Rcnf7g7h4NK409a1mzEHoj7azdEZXvvrrn/zRrWea7NhsI Kt3g== X-Gm-Message-State: ABy/qLaY5Xv/0KEDHCi3eoh0ejN11QgNyG5ntN/NRfOWHYznIDwZuWCs VsF7nxJnbVrgkuRdtBi1KpSZAlkE+/7sy9lgZw== X-Google-Smtp-Source: APBJJlHVlZEvC5NjjSyJZOQucqLdu30XRzvzGAyLgSY5HTmPkrp4a9s8HhT70tGTmErD8yktlBCVLRj6ehJ26v7ZfFA= X-Received: by 2002:a17:906:5357:b0:992:ab3a:f0d4 with SMTP id j23-20020a170906535700b00992ab3af0d4mr2346270ejo.17.1689861500214; Thu, 20 Jul 2023 06:58:20 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Geoff Winkless Date: Thu, 20 Jul 2023 14:58:06 +0100 Message-ID: Subject: Re: TSQL To Postgres - Unpivot/Union All To: Anthony Apollis Cc: pgsql-general@lists.postgresql.org Content-Type: multipart/alternative; boundary="00000000000070a1190600eb8add" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --00000000000070a1190600eb8add Content-Type: text/plain; charset="UTF-8" On Thu, 20 Jul 2023 at 13:17, Anthony Apollis wrote: > The Postgres i used: INSERT INTO temp_FieldFlowsFact > SELECT "Account", "Calendar day", "Financial year", "Period", > > [snip] At the very least, include a column list in your INSERT statement. We have no way of checking where any of your results are going. Geoff --00000000000070a1190600eb8add Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Thu, 20 Jul 2023 at 13:17, Anthony Apollis <= anthony.apollis@gmail.com&= gt; wrote:
The Postgres i used: INSERT INTO temp_FieldFlowsF= act
SELECT "Account", "Calendar day", "Financ= ial year", "Period",

<= div class=3D"gmail_default" style=3D"font-family:verdana,sans-serif;font-si= ze:small">[snip]

At the very least, in= clude a column list in your INSERT statement. We have no way of checking wh= ere any of your results are going.

Ge= off
--00000000000070a1190600eb8add--