Re: case expression
| От | Raymond O'Donnell |
|---|---|
| Тема | Re: case expression |
| Дата | |
| Msg-id | 48DABCD6.9020806@iol.ie обсуждение исходный текст |
| Ответ на | case expression (Garry Saddington <garry@schoolteachers.co.uk>) |
| Ответы |
Re: case expression
|
| Список | pgsql-general |
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 ------------------------------------------------------------------
В списке pgsql-general по дате отправления: