Skip site navigation (1) Skip section navigation (2)

Re: case expression

From: Guy Rouillier <guyr-ml1(at)burntmail(dot)com>
To: Postgres General List <pgsql-general(at)postgresql(dot)org>
Subject: Re: case expression
Date: 2008-09-25 01:49:57
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-general
Garry Saddington wrote:

> It does work but returns a column called case. How can I return the case 
> column as 'postcode'?

CASE WHEN postcode ilike '%OO%' THEN ''
END as postcode
from addresses

Guy Rouillier

In response to

pgsql-general by date

Next:From: hubert depesz lubaczewskiDate: 2008-09-25 05:35:39
Subject: Re: problem with custom_variable_classes
Previous:From: Fernando MorenoDate: 2008-09-25 01:18:52
Subject: Re: case expression

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group