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

From Richard Broersma Jr
Subject Re: Using Control Flow Functions in a SELECT Statement
Date
Msg-id 81103.2480.qm@web31804.mail.mud.yahoo.com
Whole thread Raw
In response to Using Control Flow Functions in a SELECT Statement  ("Ashish Ahlawat" <ahlawat.ashish@gmail.com>)
List pgsql-sql
> *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.


pgsql-sql by date:

Previous
From: "Ashish Ahlawat"
Date:
Subject: Using Control Flow Functions in a SELECT Statement
Next
From: Bricklen Anderson
Date:
Subject: Re: Using Control Flow Functions in a SELECT Statement