Re: Conversion from Sybase ASA

Поиск
Список
Период
Сортировка
От Ian Barwick
Тема Re: Conversion from Sybase ASA
Дата
Msg-id 200309090917.26320.barwick@gmx.net
обсуждение исходный текст
Ответ на Conversion from Sybase ASA  ("Richard Sydney-Smith" <richard@ibisaustralia.com>)
Список pgsql-sql
On Tuesday 09 September 2003 09:06, Richard Sydney-Smith wrote:
> In sybase I can use the following syntax:
>
> select 'T' as src,(if tbon is null or tbon < '1900/12/12' or tbon >
> '1900/9/30' then 'U' else 'P' endif) as pres from ftrans
>
> this returns two columns: src = 'T' and pres which has either the value 'U'
> or 'P'
>
> how would I express this in postgresql?

"CASE":

http://www.postgresql.org/docs/7.3/static/functions-conditional.html

Ian Barwick
barwick@gmx.net



В списке pgsql-sql по дате отправления:

Предыдущее
От: "Viorel Dragomir"
Дата:
Сообщение: Re: Conversion from Sybase ASA
Следующее
От: Rod Taylor
Дата:
Сообщение: Re: MINUS & ROWNUM in PostGres