On 24/09/2008 23:22, Garry Saddington wrote:
>> Garry Saddington <[EMAIL PROTECTED]> writes:
>>> CASE WHEN postcode ilike '%OO%' THEN ''
>>> END
>>> from addresses
>
> 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, ...

BTW, should you have an "else" clause in there? - What happens when the
comparison fails?

Ray.


------------------------------------------------------------------
Raymond O'Donnell, Director of Music, Galway Cathedral, Ireland
[EMAIL PROTECTED]
Galway Cathedral Recitals: http://www.galwaycathedral.org/recitals
------------------------------------------------------------------

-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

Reply via email to