pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: pgsql@yukonho.de
To: pgsql-sql@postgresql.org
Subject: Syntax for "IF" clause in SELECT
Date: Thu, 9 Feb 2006 00:12:52 +0100
Message-ID: <200602090012.52747.pgsql@yukonho.de> (raw)

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



view thread (4+ messages)  latest in thread

Message-ID: <200602090012.52747.pgsql@yukonho.de>
Permalink:  ../200602090012.52747.pgsql@yukonho.de/
Also on:    postgresql.org/message-id/200602090012.52747.pgsql@yukonho.de

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: pgsql@yukonho.de
  Subject: Re: Syntax for "IF" clause in SELECT
  In-Reply-To: <200602090012.52747.pgsql@yukonho.de>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox