Received: from localhost (maia-3.hub.org [200.46.204.184]) by postgresql.org (Postfix) with ESMTP id 03CE89FA38F for ; Mon, 4 Dec 2006 12:22:08 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.184]) (amavisd-new, port 10024) with ESMTP id 05037-03 for ; Mon, 4 Dec 2006 12:22:00 -0400 (AST) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.4 Received: from ug-out-1314.google.com (ug-out-1314.google.com [66.249.92.168]) by postgresql.org (Postfix) with ESMTP id 13CB59F9398 for ; Mon, 4 Dec 2006 12:21:59 -0400 (AST) Received: by ug-out-1314.google.com with SMTP id k3so2717375ugf for ; Mon, 04 Dec 2006 08:21:59 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:cc:mime-version:content-type; b=cCEKkLO2RY72jXtnDqZ74WZXpX8WE0rDm1GmqkhjxY2EWBTIzs094wOQ/LirN86uCjmxO1oSwYwEAivdVWAKGE4qFSbk5iauwCf8pcXUg17rv1alT9uv907a9HWZdeNbpcTqQt+wLRhW/k6gPnGDQg4Rwse5v6ac/kl0a2/iOE0= Received: by 10.78.185.16 with SMTP id i16mr7771043huf.1165249318395; Mon, 04 Dec 2006 08:21:58 -0800 (PST) Received: by 10.78.150.17 with HTTP; Mon, 4 Dec 2006 08:21:57 -0800 (PST) Message-ID: <682126990612040821p88a04d7la2a230901d118921@mail.gmail.com> Date: Mon, 4 Dec 2006 21:51:57 +0530 From: "Ashish Ahlawat" To: "Bruce Momjian" Subject: Using Control Flow Functions in a SELECT Statement Cc: "Tom Lane" , "Ken Johanson" , "Martijn van Oosterhout" , pgsql-sql@postgresql.org MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_31371_21656788.1165249317977" X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200612/42 X-Sequence-Number: 26998 ------=_Part_31371_21656788.1165249317977 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline 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 FROM DVDs *Table Structure :-* CREATE TABLE DVDs ( Name VARCHAR(60) NOT NULL, NumDisks INT NOT NULL , RatingID VARCHAR(4) NOT NULL, StatID CHAR(3) NOT NULL ) rows has been inserted with different numdisks numbers. pls help warm R's ------=_Part_31371_21656788.1165249317977 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline
 
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

FROM

DVDs

 

Table Structure :-

CREATE

TABLE DVDs (

Name VARCHAR(60) NOT NULL,

NumDisks INT NOT NULL ,

RatingID VARCHAR(4) NOT NULL,

StatID CHAR(3) NOT NULL

)

rows has been inserted with different numdisks numbers.  pls help

warm R's

------=_Part_31371_21656788.1165249317977--