Re: [GENERAL] function DECODE and triggers

2005-10-26 Thread Alban Hertroys
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

Re: [GENERAL] function DECODE and triggers

2005-10-26 Thread Oliver Elphick
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'

Re: [GENERAL] function DECODE and triggers

2005-10-25 Thread Rafael Montoya
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:

Re: [GENERAL] function DECODE and triggers

2005-10-25 Thread Oliver Elphick
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

Re: [GENERAL] function DECODE and triggers

2005-10-24 Thread Rafael Montoya
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: