X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id 2716CD1C9ED for ; Wed, 3 Mar 2004 12:51:22 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 05668-06 for ; Wed, 3 Mar 2004 08:51:17 -0400 (AST) Received: from anchor-post-31.mail.demon.net (anchor-post-31.mail.demon.net [194.217.242.89]) by svr1.postgresql.org (Postfix) with ESMTP id 04227D1C9D9 for ; Wed, 3 Mar 2004 08:51:14 -0400 (AST) Received: from mwynhau.demon.co.uk ([193.237.186.96] helo=mainbox.archonet.com) by anchor-post-31.mail.demon.net with esmtp (Exim 3.35 #1) id 1AyVqG-000DPJ-0V; Wed, 03 Mar 2004 12:51:16 +0000 Received: by mainbox.archonet.com (Postfix, from userid 529) id 5A509168D1; Wed, 3 Mar 2004 12:51:15 +0000 (GMT) Received: from client17.archonet.com (client17.archonet.com [192.168.1.17]) by mainbox.archonet.com (Postfix) with ESMTP id 966661680B; Wed, 3 Mar 2004 12:51:13 +0000 (GMT) From: Richard Huxton To: a.schmitz@cityweb.de, Subject: Re: oracle decode() Date: Wed, 3 Mar 2004 12:51:12 +0000 User-Agent: KMail/1.5 References: <200403031148.39667.a.schmitz@cityweb.de> In-Reply-To: <200403031148.39667.a.schmitz@cityweb.de> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200403031251.12607.dev@archonet.com> X-Bogosity: No, tests=bogofilter, spamicity=0.000000, version=0.15.3 X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200403/27 X-Sequence-Number: 17126 On Wednesday 03 March 2004 10:48, Andreas Schmitz wrote: > Hello, > > is there any equivalent for ORACLEs decode() in pl/pgsql ? Is that the function that works like CASE? CASE WHEN x=1 THEN 'ONE' WHEN x=2 THEN 'TWO' END See the reference manual for syntax (conditional functions/operators iirc). -- Richard Huxton Archonet Ltd