X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 833B03CC9B9 for ; Fri, 17 Dec 2004 13:09:09 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 54348-04 for ; Fri, 17 Dec 2004 13:08:58 +0000 (GMT) Received: from sharp.noc24x7.com (unknown [69.56.128.138]) by svr1.postgresql.org (Postfix) with ESMTP id 1AE8D3CC408 for ; Fri, 17 Dec 2004 13:09:00 +0000 (GMT) Received: from [61.3.110.149] (helo=thenilgiris.com) by sharp.noc24x7.com with esmtpa (Exim 4.43) id 1CfHqu-0005Zn-1D; Fri, 17 Dec 2004 18:39:00 +0530 Received: from localhost (localhost [[UNIX: localhost]]) by thenilgiris.com (8.11.2/8.11.2) id iBHD1Ir31821; Fri, 17 Dec 2004 18:31:18 +0530 Content-Type: text/plain; charset="iso-8859-1" From: Kenneth Gonsalves To: Andreas Kretschmer , pgsql-sql@postgresql.org Subject: Re: [despammed] sql can i substitute Date: Fri, 17 Dec 2004 18:31:18 +0530 X-Mailer: KMail [version 1.2] References: <0412171655451H.06834@thenilgiris.com> <0412171748151J.06834@thenilgiris.com> <20041217122445.GA19602@Pinguin.wug-glas.de> In-Reply-To: <20041217122445.GA19602@Pinguin.wug-glas.de> MIME-Version: 1.0 Message-Id: <0412171831181R.06834@thenilgiris.com> Content-Transfer-Encoding: 8bit X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - sharp.noc24x7.com X-AntiAbuse: Original Domain - postgresql.org X-AntiAbuse: Originator/Caller UID/GID - [0 0] / [47 12] X-AntiAbuse: Sender Address Domain - thenilgiris.com X-Source: X-Source-Args: X-Source-Dir: X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.168 tagged_above=0 required=5 tests=AWL, FORGED_RCVD_HELO X-Spam-Level: X-Archive-Number: 200412/122 X-Sequence-Number: 19742 On Friday 17 December 2004 05:54 pm, Andreas Kretschmer wrote: > Yes, simple: > > test=# select name, case > test-# when fruit = 1 then 'good' > test-# when fruit = 2 then 'bad' > test-# when fruit = 3 then 'rotten' end as fruit from fruit; can one do the same thing for an 'insert' statement? kg