Re: SQL Query Syntax help

From: "srikkanth" <srikkanth16081991(at)rediffmail(dot)com>
To: "Jan Kohnert" <nospam001-lists(at)jan-kohnert(dot)de>
Cc: "pgsql-general(at)lists(dot)postgresql(dot)org" <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Re: SQL Query Syntax help
Date: 2020-01-22 12:07:23
Message-ID: 1579693316.S.4139.29659.f4-234-218.1579694843.30318@webmail.rediffmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin pgsql-general

Hi Jan,Thanks for your input, it is working exactly what i want, but still i m facing issue because in my table there are different data types they are 10 to 15 columns are Boolean, one primary key, 140 columns are character.when i m applying the logic on this scenario i m getting the below error.ERROR: UNION types boolean and character cannot be matchedLINE 10: ..._ID&quot;,&quot;Critical_Decision&quot; as col_Name, &quot;Critical_... ^SQL state: 42804Character: 585After applying the logic i need to take this data into the table.can you please help me how to write the syntax in this case.Thanks,Srikanth BFrom: Jan Kohnert &lt;nospam001-lists(at)jan-kohnert(dot)de&gt;Sent: Wed, 22 Jan 2020 17:11:56To: pgsql-general(at)lists(dot)postgresql(dot)orgSubject: Re: SQL Query Syntax helpHi,Am Mittwoch, 22. Januar 2020, 12:00:45 CET schrieb srikkanth:[sniped HTML]something likeselect&nbsp; &nbsp;id, &#39;Col A&#39; as &quot;Col Name&quot;, &quot;Col A&quot; as &quot;Col Value&quot;from inputunion allselect&nbsp; &nbsp;id, &#39;Col B&#39; as &quot;Col Name&quot;, &quot;Col B&quot; as &quot;Col Value&quot;from input...order by&nbsp; &nbsp;1, 2;should work.--Kind regards Jan&nbsp;

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message David G. Johnston 2020-01-22 15:34:17 Re: SQL Query Syntax help
Previous Message Geoff Winkless 2020-01-22 12:06:01 Re: SQL Query Syntax help

Browse pgsql-general by date

  From Date Subject
Next Message İlyas Derse 2020-01-22 12:55:27 @@TRANCOUNT ?
Previous Message Geoff Winkless 2020-01-22 12:06:01 Re: SQL Query Syntax help