Re: SQL Query Syntax help

From: Jan Kohnert <nospam001-lists(at)jan-kohnert(dot)de>
To: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: SQL Query Syntax help
Date: 2020-01-22 11:41:32
Message-ID: 3590239.kQq0lBPeGt@kohnert-n4
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin pgsql-general

Hi,

Am Mittwoch, 22. Januar 2020, 12:00:45 CET schrieb srikkanth:
[sniped HTML]

something like

select
id, 'Col A' as "Col Name", "Col A" as "Col Value"
from input
union all
select
id, 'Col B' as "Col Name", "Col B" as "Col Value"
from input
...
order by
1, 2;

should work.

--
Kind regards Jan

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Daniel Verite 2020-01-22 11:58:33 Re: SQL Query Syntax help
Previous Message srikkanth 2020-01-22 11:00:45 SQL Query Syntax help

Browse pgsql-general by date

  From Date Subject
Next Message Олег Самойлов 2020-01-22 11:46:25 PgQ and NOTIFY/LISTEN
Previous Message srikkanth 2020-01-22 11:00:45 SQL Query Syntax help