Re: [SQL] Syntax for "IF" clause in SELECT

2006-02-09 Thread Andrew Sullivan
What you want is the SQL-standard CASE statement. A On Wed, Feb 08, 2006 at 06:06:10PM -0800, Ken Hill wrote: > This has been something I've been trying do so that I can do some column > comparisons as part of "data-cleaning" work. I'll let you know if this > helps me accomplish my task! > > On

Re: [SQL] Syntax for "IF" clause in SELECT

2006-02-08 Thread Ken Hill
This has been something I've been trying do so that I can do some column comparisons as part of "data-cleaning" work. I'll let you know if this helps me accomplish my task! On Wed, 2006-02-08 at 15:20 -0800, Bricklen Anderson wrote: [EMAIL PROTECTED] wrote: > Greetings, > > the following is

Re: [SQL] Syntax for "IF" clause in SELECT

2006-02-08 Thread Bricklen Anderson
[EMAIL PROTECTED] wrote: 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,' '

[SQL] Syntax for "IF" clause in SELECT

2006-02-08 Thread pgsql
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,' ','