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 1FEBA3CC675 for ; Fri, 17 Dec 2004 11:25:12 +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 12196-02 for ; Fri, 17 Dec 2004 11:25:02 +0000 (GMT) Received: from sharp.noc24x7.com (unknown [69.56.128.138]) by svr1.postgresql.org (Postfix) with ESMTP id 169A43CC660 for ; Fri, 17 Dec 2004 11:25:00 +0000 (GMT) Received: from [61.3.110.149] (helo=thenilgiris.com) by sharp.noc24x7.com with esmtpa (Exim 4.43) id 1CfGEE-0007al-9P for pgsql-sql@postgresql.org; Fri, 17 Dec 2004 16:54:59 +0530 Received: from localhost (localhost [[UNIX: localhost]]) by thenilgiris.com (8.11.2/8.11.2) id iBHBPjf31099 for pgsql-sql@postgresql.org; Fri, 17 Dec 2004 16:55:45 +0530 Content-Type: text/plain; charset="iso-8859-1" From: Kenneth Gonsalves To: pgsql-sql@postgresql.org Subject: sql can i substitute Date: Fri, 17 Dec 2004 16:55:45 +0530 X-Mailer: KMail [version 1.2] MIME-Version: 1.0 Message-Id: <0412171655451H.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.267 tagged_above=0 required=5 tests=AWL, FORGED_RCVD_HELO X-Spam-Level: X-Archive-Number: 200412/115 X-Sequence-Number: 19735 hi table: name varchar(10) fruit integer i want to write an sql statement like this: select fruit from table which should return 'good' if fruit = 1 and 'bad' if fruit =2 and 'rotten' if fruit =3 can it be done? kg