Received: from localhost (maia-4.hub.org [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 407E59FA38F for ; Mon, 4 Dec 2006 12:31:23 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-new, port 10024) with ESMTP id 34750-05 for ; Mon, 4 Dec 2006 12:30:57 -0400 (AST) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.4 Received: from web31804.mail.mud.yahoo.com (web31804.mail.mud.yahoo.com [68.142.207.67]) by postgresql.org (Postfix) with SMTP id 7C2199FA2CC for ; Mon, 4 Dec 2006 12:30:57 -0400 (AST) Received: (qmail 4374 invoked by uid 60001); 4 Dec 2006 16:30:56 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=X-YMail-OSG:Received:Date:From:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding:Message-ID; b=r55IrUlV3QGLF13sVdShfXZtD1N9F7ZuiShQJCePf/7p19EQ4EtIAKzifbcw7SuV0f53U4i3S49vedABLQCoDSka3vSDd0bYZBewDD9SLmFhx+Rvq8U4NDJbjr2QQpDWXbst2ZYUTdlzH71LNBdB4E5xJxGujQ9Of2CZAMFNyXg=; X-YMail-OSG: AB79yYkVM1kyNVjNwKqPBmpRjM2WPgfOkx64NDbN5UsOlBcllot7FUOHI2t25WH8XDO34IWpvwO13NdIrxMPVJKbnWMTECETMk9_hJC8BoyUaoOU_EJCjayFiHODE6y3RtrHWJuCpDRJROI- Received: from [12.177.97.50] by web31804.mail.mud.yahoo.com via HTTP; Mon, 04 Dec 2006 08:30:55 PST Date: Mon, 4 Dec 2006 08:30:55 -0800 (PST) From: Richard Broersma Jr Subject: Re: Using Control Flow Functions in a SELECT Statement To: Ashish Ahlawat Cc: pgsql-sql@postgresql.org In-Reply-To: <682126990612040821p88a04d7la2a230901d118921@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Message-ID: <81103.2480.qm@web31804.mail.mud.yahoo.com> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200612/43 X-Sequence-Number: 26999 > *ORA: 00907: Missing right parenthesis* > Query :- > SELECT Name AS Title, StatID AS Status, RatingID AS Rating, > IF(NumDisks>1, 'Check for extra disks!', 'Only 1 disk.') AS Verify What kind of error is ORA? Is this an oracle error? In postgresql I do not believe that the "IF" predicate exists. However the "CASE" predicate does and will do what you want. http://www.postgresql.org/files/documentation/books/aw_pgsql/node44.html Regards, Richard Broersma Jr.