Re: [SQL] CASE

From: José Soares <jose(at)sferacarta(dot)com>
To: vernichon eric <e(dot)vernichon(at)borchers(dot)fr>
Cc: "'pgsql-sql(at)hub(dot)org'" <pgsql-sql(at)hub(dot)org>
Subject: Re: [SQL] CASE
Date: 1999-05-03 12:43:28
Message-ID: 372D99EF.583A769@sferacarta.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

You need v6.5beta, previous releases haven't this feature:

SELECT *, CASE
WHEN COLUMN1 = 1
THEN 'A'
WHEN COLUMN1 = 2
THEN 'B'
ELSE 'C'
END FROM TABLE2;
column1|case
-------+----
1|A
2|B
3|C
4|C
(4 rows)

José

vernichon eric ha scritto:

> Hello ,
>
> I want transfered query from sql serveur to postgres but i
> don't know how use CASE with postgres
>
> Thank you
>
> Eric Vernichon

--
______________________________________________________________
PostgreSQL 6.5.0 on i586-pc-linux-gnu, compiled by gcc 2.7.2.3
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Jose'

In response to

  • CASE at 1999-05-03 07:55:33 from vernichon eric

Browse pgsql-sql by date

  From Date Subject
Next Message Frank Morton 1999-05-03 13:21:47 Slow Inserts Again
Previous Message Herouth Maoz 1999-05-03 09:42:05 Re: [SQL] Index on date_trunc