From: Moreno Andreo <moreno.andreo@evolu-s.it>
To: pgsql-general@lists.postgresql.org
Subject: Re: CASE(?) to write in a different column based on a string pattern
Date: Wed, 13 Nov 2019 18:00:14 +0100
Message-ID: <148477df-180e-3a9a-97f8-c27de5c2f2c1@evolu-s.it> (raw)
In-Reply-To: <CAJvnOJbgAHvBy9rbGNZju2p9wY-hu0UvzOMLOA2nyVbDY+btng@mail.gmail.com>
References: <5bbe8366-bcd4-7f6f-94c8-ebc465c3b6b7@evolu-s.it>
<CAEzk6ff14JeGb0MtbGZLq2vSJ7SrnNE6FzABsRrkb_n592E-YQ@mail.gmail.com>
<CAJvnOJbgAHvBy9rbGNZju2p9wY-hu0UvzOMLOA2nyVbDY+btng@mail.gmail.com>
Il 13/11/19 17:48, Andrew Kerber ha scritto:
> So what you are doing is transforming the table format from vertical
> to horizontal. I think you will want to use a union to join the table
> to itself along with the case statement to produce the output you are
> looking for.
>
Not precisely, the string pattern is only part of a bigger table (30
columns in total), what I'm trying to achieve is what Geoff explained,
just split values in 3 different columns based on the string pattern
Thanks for your time
Moreno.
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: moreno.andreo@evolu-s.it
Subject: Re: CASE(?) to write in a different column based on a string pattern
In-Reply-To: <148477df-180e-3a9a-97f8-c27de5c2f2c1@evolu-s.it>
References: <5bbe8366-bcd4-7f6f-94c8-ebc465c3b6b7@evolu-s.it> <CAEzk6ff14JeGb0MtbGZLq2vSJ7SrnNE6FzABsRrkb_n592E-YQ@mail.gmail.com> <CAJvnOJbgAHvBy9rbGNZju2p9wY-hu0UvzOMLOA2nyVbDY+btng@mail.gmail.com> <148477df-180e-3a9a-97f8-c27de5c2f2c1@evolu-s.it>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox