Received: from localhost (maia-1.hub.org [200.46.204.191]) by postgresql.org (Postfix) with ESMTP id 0EDA19FA2CC for ; Mon, 4 Dec 2006 12:32:13 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.191]) (amavisd-new, port 10024) with ESMTP id 20972-05 for ; Mon, 4 Dec 2006 12:32:07 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from presinet.com (mail.presinet.com [209.53.156.1]) by postgresql.org (Postfix) with ESMTP id 35BFC9F9398 for ; Mon, 4 Dec 2006 12:32:07 -0400 (AST) Received: from [10.10.1.151] ([10.10.1.151]) by presinet.com with Microsoft SMTPSVC(6.0.3790.1830); Mon, 4 Dec 2006 08:31:26 -0800 Message-ID: <45744D85.9050107@presinet.com> Date: Mon, 04 Dec 2006 08:32:05 -0800 From: Bricklen Anderson User-Agent: Thunderbird 1.5.0.8 (X11/20061117) MIME-Version: 1.0 To: Ashish Ahlawat CC: pgsql-sql@postgresql.org Subject: Re: Using Control Flow Functions in a SELECT Statement References: <682126990612040821p88a04d7la2a230901d118921@mail.gmail.com> In-Reply-To: <682126990612040821p88a04d7la2a230901d118921@mail.gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 04 Dec 2006 16:31:26.0234 (UTC) FILETIME=[A4ADF7A0:01C717C1] X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200612/44 X-Sequence-Number: 27000 Ashish Ahlawat wrote: > > Hi Team > > I am unable to fetch data using following simple query it prompts > following error > > *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 > i. That's an Oracle error message. ii. IF does not belong in an SQL query. Use CASE.