pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: José Soares <jose@sferacarta.com>
To: vernichon eric <e.vernichon@borchers.fr>
Cc: 'pgsql-sql@hub.org' <pgsql-sql@hub.org>
Subject: Re: [SQL] CASE
Date: Mon, 03 May 1999 14:43:28 +0200
Message-ID: <372D99EF.583A769@sferacarta.com> (raw)
References: <372D5675.9F41DD8F@borchers.fr>

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'

view thread (20+ messages)  latest in thread

Message-ID: <372D99EF.583A769@sferacarta.com>
Permalink:  ../372D99EF.583A769@sferacarta.com/
Also on:    postgresql.org/message-id/372D99EF.583A769@sferacarta.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: jose@sferacarta.com, e.vernichon@borchers.fr, pgsql-sql@hub.org
  Subject: Re: [SQL] CASE
  In-Reply-To: <372D99EF.583A769@sferacarta.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox