RE: [SQL] IIF..

From: "Jackson, DeJuan" <djackson(at)cpsgroup(dot)com>
To: Eduardo Noeda <enoeda(at)virtualsw(dot)es>, pgsql-sql(at)postgreSQL(dot)org
Subject: RE: [SQL] IIF..
Date: 1999-03-29 19:20:15
Message-ID: D05EF808F2DFD211AE4A00105AA1B5D20376A6@cpsmail
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

It would be:
SELECT (CASE Number
WHEN 1 THEN 'First'
ELSE 'Other'
END) AS Description
FROM Table

-DEJ

> -----Original Message-----
> Hi!
>
> I'm new in the list (and in PostgreSQL too). I'd like to know
> if it's posible to perform a function like SQL Server's "iif"
> in a SELECT query. Some like:
>
> SELECT iif (Number=1, "First", "Other") AS Description
> FROM Table;
>
> I don't know if I've explained properly...
> --
> Eduardo Noeda -- Virtual Software
> enoeda(at)virtualsw(dot)es

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Gregory Holston 1999-03-29 20:19:35 union on views
Previous Message Herouth Maoz 1999-03-29 16:00:00 Re: [GENERAL] Returning an integer from a date