Re: immediate if function - Mailing list pgsql-general

From Neil Conway
Subject Re: immediate if function
Date
Msg-id 1044590926.28519.36.camel@tokyo
Whole thread Raw
In response to immediate if function  (<terry@ashtonwoodshomes.com>)
List pgsql-general
On Thu, 2003-02-06 at 22:55, terry@ashtonwoodshomes.com wrote:
> I have a date field, and if the status is X then I want to return the date,
> otherwise I want to return a null.  Any ideas?

CASE should work:

http://www.ca.postgresql.org/users-lounge/docs/7.3/postgres/functions-conditional.html

Cheers,

Neil

--
Neil Conway <neilc@samurai.com> || PGP Key ID: DB3C29FC




pgsql-general by date:

Previous
From:
Date:
Subject: immediate if function
Next
From: Chris Johnson
Date:
Subject: Re: FreeBSD: SMP and PostgreSQL