X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by postgresql.org (Postfix) with ESMTP id AFC169DCBE4 for ; Wed, 8 Feb 2006 19:12:46 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 76601-06 for ; Wed, 8 Feb 2006 19:12:48 -0400 (AST) X-Greylist: delayed 04:39:46.088312 by SQLgrey- Received: from 208091.vserver.de (nirs.de [62.75.208.91]) by postgresql.org (Postfix) with ESMTP id 24D829DC86D for ; Wed, 8 Feb 2006 19:12:43 -0400 (AST) Received: from becker.local (p54AD4680.dip0.t-ipconnect.de [84.173.70.128]) (authenticated bits=0) by 208091.vserver.de (8.12.8/8.12.8) with ESMTP id k18NCaOl014272 for ; Thu, 9 Feb 2006 00:12:37 +0100 From: pgsql@yukonho.de Reply-To: pgsql@yukonho.de To: pgsql-sql@postgresql.org Subject: Syntax for "IF" clause in SELECT Date: Thu, 9 Feb 2006 00:12:52 +0100 User-Agent: KMail/1.6.2 MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Message-Id: <200602090012.52747.pgsql@yukonho.de> X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0.55 required=5 tests=[NO_REAL_NAME=0.55] X-Spam-Score: 0.55 X-Spam-Level: X-Archive-Number: 200602/88 X-Sequence-Number: 24098 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,=20 or is the some other way to do this.... select =A0if(spektrum is null,' ','J'), =A0if(s19 is null,' ','J'), =A0if(OhneGrenze is null,' ','J'), =A0from namen; Do I need to create my own function to allow this behaviour! my best regards, Stefan =2D-=20 email: stefan@yukonho.de tel : +49 (0)6232-497631 http://www.yukonho.de