Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Whats wrong with this decode sql query.
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
![]() |
![]() |