On Wednesday 24 September 2008 21:03, Tom Lane wrote: > Garry Saddington <[EMAIL PROTECTED]> writes: > > Can anyone tell me why this will not work? > > > > select *, > > CASE WHEN postcode ilike '%OO%' THEN '' > > END > > from addresses > > ... > > Define "not work". What are you expecting it to do versus what > really happens? > > Right offhand it looks like the CASE will return either an empty > string or a NULL, which doesn't seem particularly useful ... > > regards, tom lane It does work but returns a column called case. How can I return the case column as 'postcode'?
Regards garry -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general