pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Richard Huxton <dev@archonet.com>
To: a.schmitz@cityweb.de, <pgsql-sql@postgresql.org>
Subject: Re: oracle decode()
Date: Wed, 3 Mar 2004 12:51:12 +0000
Message-ID: <200403031251.12607.dev@archonet.com> (raw)
In-Reply-To: <200403031148.39667.a.schmitz@cityweb.de>
References: <200403031148.39667.a.schmitz@cityweb.de>

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



view thread (2+ messages)

Message-ID: <200403031251.12607.dev@archonet.com>
Permalink:  ../200403031251.12607.dev@archonet.com/
Also on:    postgresql.org/message-id/200403031251.12607.dev@archonet.com

 · 

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: dev@archonet.com
  Subject: Re: oracle decode()
  In-Reply-To: <200403031251.12607.dev@archonet.com>

* 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