Using Control Flow Functions in a SELECT Statement - Mailing list pgsql-sql

From Ashish Ahlawat
Subject Using Control Flow Functions in a SELECT Statement
Date
Msg-id 682126990612040821p88a04d7la2a230901d118921@mail.gmail.com
Whole thread Raw
Responses Re: Using Control Flow Functions in a SELECT Statement
Re: Using Control Flow Functions in a SELECT Statement
List pgsql-sql
 
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

pgsql-sql by date:

Previous
From: "Travis Whitton"
Date:
Subject: Re: pg_xlog on separate drive
Next
From: Richard Broersma Jr
Date:
Subject: Re: Using Control Flow Functions in a SELECT Statement