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

Home -> Community -> Usenet -> c.d.o.server -> Re: select from (select...)

Re: select from (select...)

From: L120bj <l120bj_at_aol.com>
Date: 1997/06/28
Message-ID: <19970628102500.GAA29568@ladder01.news.aol.com>#1/1

We had a similar problem a few months back. Oracle support said that it was a known bug, but the version it would be fixed in had not at that time been decided. I received a phone call from them about a month ago (credit where credit's due) to say that it would be fixed in 7.3.4 (I think!), but don't quote me on that.




Subject: Re: select from (select...)
From: Robert Christenson <robertoc_at_fyiowa.infi.net> Date: Mon, 23 Jun 1997 10:51:22 -0700
Message-ID: <33AEB79A.273A_at_fyiowa.infi.net>

Oren Nakdimon wrote:
>
> 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
> =============================

I had the same problem a while back. I found that I could execute this structure in straight sql, but if any plsql reference was made (variables, functions or even INTO) the statement hit the error. Sorry, no answers, just that it must be a bug(?) in the PL/SQL interface to sql. I never called Oracle on it. Anyone else? Received on Sat Jun 28 1997 - 00:00:00 CDT

Original text of this message

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