On 24/09/2008 23:22, Garry Saddington wrote:
>> Garry Saddington <garry@schoolteachers.co.uk> 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
rod@iol.ie
Galway Cathedral Recitals: http://www.galwaycathedral.org/recitals
------------------------------------------------------------------