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 -> select from (select...)

select from (select...)

From: Oren Nakdimon <oren_at_My_eMail.is_in_the_signature>
Date: 1997/06/23
Message-ID: <33AE7876.D0BD5FB0@My_eMail.is_in_the_signature>#1/1

Hi.
I'm trying to do a query with sub-query in the FROM clause, in PL/SQL (Oracle 7.3.3, PL/SQL 2.3.2.3.1 on Windows NT 4). The sub-query is using some variables, and it's not working.

This is a simple example:

declare

   a number;
   r dual%rowtype;
begin

   select *
   into r
   from ( select *

          from dual
          where a=a );

end;
/

declare
*
ERROR at line 1:
ORA-06550: line 7, column 9:
PLS-00320: the declaration of the type of this expression is incomplete or
malformed
ORA-06550: line 5, column 4:
PL/SQL: SQL Statement ignored

When I don't use variables in the sub-query it works. It works also when I use the sub-query in the FROM clause of other statements (e.g. DELETE).

Can someone help me ?
Thanks, Oren.



Oren Nakdimon
Golden Screens Ltd.
email: oren_at_gsit.co.il
tel: +972-3-7510836
fax: +972-3-7518221
Received on Mon Jun 23 1997 - 00:00:00 CDT

Original text of this message

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