SQL Query Syntax help

From: "srikkanth" <srikkanth16081991(at)rediffmail(dot)com>
To: <pgsql-admin(at)postgresql(dot)org>, <pgsql-general(at)postgresql(dot)org>
Subject: SQL Query Syntax help
Date: 2020-01-22 11:00:45
Message-ID: 20200122110045.14705.qmail@f4mail-235-235.rediffmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin pgsql-general

Hi Team,Can you please help me in writing the syntax for the below mentioned table.Input :&nbsp; ID Col A Col B Col C Col D Col E Col F 1111 aaaa bbbb cccc dddd eeee ffff 2222 bbbb cccc dddd eeee ffff aaaa 3333 cccc dddd eeee ffff aaaa bbbb 4444 dddd eeee ffff aaaa bbbb cccc 5555 eeee ffff aaaa bbbb cccc dddd 6666 ffff aaaa bbbb cccc dddd eeee 7777 cccc dddd eeee ffff aaaa bbbb 8888 dddd eeee ffff aaaa bbbb cccc 9999 ffff aaaa bbbb cccc dddd eeee &nbsp;Required Output : ID Col Name Col Value 1111 Col A aaaa 1111 Col B bbbb 1111 Col C cccc 1111 Col D dddd 1111 Col E eeee 1111 Col F ffff 2222 Col A bbbb 2222 Col B cccc 2222 Col C dddd 2222 Col D eeee 2222 Col E ffff 2222 Col F aaaa 3333 Col A cccc 3333 Col B dddd 3333 Col C eeee 3333 Col D ffff 3333 Col E aaaa 3333 Col F bbbb And so on for the 4444, 5555, 6666, 7777, 8888, 9999Thanks,Srikanth B

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Jan Kohnert 2020-01-22 11:41:32 Re: SQL Query Syntax help
Previous Message Laurenz Albe 2020-01-22 10:33:33 Re: oldest xmin is far in the past: PG 11

Browse pgsql-general by date

  From Date Subject
Next Message Jan Kohnert 2020-01-22 11:41:32 Re: SQL Query Syntax help
Previous Message Tanja Savic 2020-01-22 10:18:15 PostgresSQL 10 on remote server - Socket is not connected (0x00002749/10057)