Rafael Montoya wrote:
Thanks for your answer, and if i have many options like
decode
(pre.C_EST,'01','U','02','M','03','W','04','D','05','O','06','S','') as Est
do i have to write many else options in this way?
select case when pre.C_EST = '01' THEN 'U'
ELSE when pre-C_EST = '02' THE
On Tue, 2005-10-25 at 18:31 +0200, Rafael Montoya wrote:
> Thanks for your answer, and if i have many options like
>
> decode (pre.C_EST,'01','U','02','M','03','W','04','D','05','O','06','S','')
> as Est
>
> do i have to write many else options in this way?
>
> select case when pre.C_EST = '01'
ave to write many else options in this way?
select case when pre.C_EST = '01' THEN 'U'
ELSE when pre-C_EST = '02' THEN 'M'
...
END AS EST
Rafael
From: Oliver Elphick
Reply-To: olly@lfix.co.uk
To: Rafael Montoya <[EMAIL PROTECTED]>
CC:
On Tue, 2005-10-25 at 00:16 +0200, Rafael Montoya wrote:
> I'm migrating from oracle to postgresl, and i have these 2 problems:
>
> 1.
> PostgreSQL doesn't support function DECODE from Oracle, but it can be
> replicated with
> CASE WHEN expr THEN expr [...] ELSE expr END , the problem appears w
I'm migrating from oracle to postgresl, and i have these 2 problems:
1.
PostgreSQL doesn't support function DECODE from Oracle, but it can be
replicated with
CASE WHEN expr THEN expr [...] ELSE expr END , the problem appears when i
want to convert this sentence from oracle to postgresl: