Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: Whats wrong with this decode sql query.

Re: Whats wrong with this decode sql query.

From: Alien <stijf_at_stijf.com>
Date: 8 Mar 2006 12:10:06 -0800
Message-ID: <1141848606.689217.141990@v46g2000cwv.googlegroups.com>


Hi,

You're mixing up 2 things. Every query needs to have a select and from clause.
select <columns> from <tables/views>;
In the select clause, you can use scalar subqueries. They can return no more than 1 row, and the result is a value in the resultset. In the from-clause, you can use inline-views. This is you select your data from another select-statement.

In your case, you'll have to use an inline-view. You're missing the from clause in the outer select. And your subqueries return (or may return) more than 1 row.

Regards,

Arian Received on Wed Mar 08 2006 - 14:10:06 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US