Re: [SQL] CASE - Mailing list pgsql-sql

From José Soares
Subject Re: [SQL] CASE
Date
Msg-id 372D99EF.583A769@sferacarta.com
Whole thread Raw
In response to CASE  (vernichon eric <e.vernichon@borchers.fr>)
List pgsql-sql
<tt>You need v6.5beta, previous releases haven't this feature:</tt><tt></tt><p><tt>SELECT *, CASE</tt><br /><tt>    
WHENCOLUMN1 = 1</tt><br /><tt>        THEN 'A'</tt><br /><tt>     WHEN COLUMN1 = 2</tt><br /><tt>        THEN
'B'</tt><br/><tt>     ELSE 'C'</tt><br /><tt>END FROM TABLE2;</tt><br /><tt>column1|case</tt><br
/><tt>-------+----</tt><br/><tt>      1|A</tt><br /><tt>      2|B</tt><br /><tt>      3|C</tt><br /><tt>     
4|C</tt><br/><tt>(4 rows)</tt><p>José <p>vernichon eric ha scritto: <blockquote type="CITE">            Hello ,
<p>       I want  transfered query from sql serveur to  postgres but  i <br />don't know how use CASE with postgres
<p>       Thank you <p>Eric Vernichon</blockquote><p>-- <br
/>______________________________________________________________<br />PostgreSQL 6.5.0 on i586-pc-linux-gnu, compiled
bygcc 2.7.2.3 <br />^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ <br />Jose' <br />  

pgsql-sql by date:

Previous
From: Herouth Maoz
Date:
Subject: Re: [SQL] Index on date_trunc
Next
From: "Frank Morton"
Date:
Subject: Slow Inserts Again