Received: from bjke.com (firewall-user@ganymede.bjke.com [144.210.8.38]) by hub.org (8.9.2/8.9.1) with ESMTP id TAA58290 for ; Mon, 29 Mar 1999 19:31:27 -0500 (EST) (envelope-from djackson@cpsgroup.com) Received: by bjke.com; id SAA29224; Mon, 29 Mar 1999 18:31:26 -0600 (CST) Received: from unknown(144.210.12.10) by gauntlet.bjke.com via smap (4.1) id xma029019; Mon, 29 Mar 99 18:30:53 -0600 Received: by cpsmail with Internet Mail Service (5.5.2448.0) id ; Mon, 29 Mar 1999 18:31:21 -0600 Message-ID: From: "Jackson, DeJuan" To: Clark Evans , jwieck@debis.com Cc: Eduardo Noeda , pgsql-sql@postgreSQL.org Subject: RE: [SQL] IIF.. Date: Mon, 29 Mar 1999 18:31:19 -0600 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2448.0) Content-Type: text/plain; charset="iso-8859-1" Try it on current snapshot. Any comment Jan? -DEJ > -----Original Message----- > From: Clark Evans [mailto:clark.evans@manhattanproject.com] > Sent: Monday, March 29, 1999 6:01 PM > To: Jackson, DeJuan > Cc: Eduardo Noeda; pgsql-sql@postgreSQL.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 >