RE: [SQL] IIF..

From: "Jackson, DeJuan" <djackson(at)cpsgroup(dot)com>
To: Clark Evans <clark(dot)evans(at)manhattanproject(dot)com>, jwieck(at)debis(dot)com
Cc: Eduardo Noeda <enoeda(at)virtualsw(dot)es>, pgsql-sql(at)postgreSQL(dot)org
Subject: RE: [SQL] IIF..
Date: 1999-03-30 00:31:19
Message-ID: D05EF808F2DFD211AE4A00105AA1B5D20378A9@cpsmail
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-sql

Try it on current snapshot. Any comment Jan?
-DEJ
> -----Original Message-----
> From: Clark Evans [mailto:clark(dot)evans(at)manhattanproject(dot)com]
> Sent: Monday, March 29, 1999 6:01 PM
> To: Jackson, DeJuan
> Cc: Eduardo Noeda; pgsql-sql(at)postgreSQL(dot)org
> Subject: Re: [SQL] IIF..
>
>
> "Jackson, DeJuan" wrote:
> > It would be:
> > SELECT (CASE Number
> > WHEN 1 THEN 'First'
> > ELSE 'Other'
> > END) AS Description
> > FROM Table
>
> Way cool. A new trick for me.
> This is similar to DECODE, I assume.
>
> However, I tried this test on a snapshot
> about a week old, and this is the result:
>
> > Welcome to the POSTGRESQL interactive sql monitor:
> > Please read the file COPYRIGHT for copyright terms of POSTGRESQL
> >
> > type \? for help on slash commands
> > type \q to quit
> > type \g or terminate with semicolon to execute query
> > You are currently connected to the database: clark
> >
> > clark=> create table test (a text, b int4 );
> > CREATE
> > clark=> insert into test values ( 'one', 1);
> > INSERT 18634 1
> > clark=> insert into test values ( 'two', 2);
> > INSERT 18635 1
> > clark=> insert into test values ( null, null);
> > INSERT 18636
> > clark=> select ( case b when 1 then 'first' else 'other'
> end ) as xx from test;
> > ERROR: copyObject: don't know how to copy 704
> > clark=>
> >
>
> Did this work in earlier versions? If so, then perhaps this
> should be added to a regression test if it isn't already.
>
> Best,
>
> Clark
>

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tatsuo Ishii 1999-03-30 01:40:32 Re: [HACKERS] vacuum updated...
Previous Message The Hermit Hacker 1999-03-30 00:25:04 Commercial Support ...

Browse pgsql-sql by date

  From Date Subject
Next Message Clark Evans 1999-03-30 02:43:00 SELECT (CASE ... ) gives copyObject error in current CVS build.
Previous Message Clark Evans 1999-03-30 00:01:08 Re: [SQL] IIF..