From: Bricklen Anderson <banderson@presinet.com>
To: Ashish Ahlawat <ahlawat.ashish@gmail.com>
Cc: pgsql-sql@postgresql.org
Subject: Re: Using Control Flow Functions in a SELECT Statement
Date: Mon, 04 Dec 2006 08:32:05 -0800
Message-ID: <45744D85.9050107@presinet.com> (raw)
In-Reply-To: <682126990612040821p88a04d7la2a230901d118921@mail.gmail.com>
References: <682126990612040821p88a04d7la2a230901d118921@mail.gmail.com>
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.
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: banderson@presinet.com, ahlawat.ashish@gmail.com
Subject: Re: Using Control Flow Functions in a SELECT Statement
In-Reply-To: <45744D85.9050107@presinet.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox