Syntax for "IF" clause in SELECT

Поиск
Список
Период
Сортировка
От pgsql@yukonho.de
Тема Syntax for "IF" clause in SELECT
Дата
Msg-id 200602090012.52747.pgsql@yukonho.de
обсуждение исходный текст
Ответы Re: Syntax for "IF" clause in SELECT
Список pgsql-sql
Greetings,

the following is an MySQL statement that I would like to
translate to PostgreSQL:

Could someone point me to a documentation of a coresponding
Systax for an "IF" clause in the a SELECT,
or is the some other way to do this....

select
 if(spektrum is null,' ','J'),
 if(s19 is null,' ','J'),
 if(OhneGrenze is null,' ','J'),
 from namen;


Do I need to create my own function to allow this behaviour!


my best regards,

Stefan
--
email: stefan@yukonho.de
tel  : +49 (0)6232-497631
http://www.yukonho.de


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

Предыдущее
От: Ken Hill
Дата:
Сообщение: Re: Non Matching Records in Two Tables
Следующее
От: Bricklen Anderson
Дата:
Сообщение: Re: Syntax for "IF" clause in SELECT