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: PL/SQL nested select ...

Re: PL/SQL nested select ...

From: Jonathan Gennick <gennick_at_worldnet.att.net>
Date: 1998/06/13
Message-ID: <6lsqhs$nvt@bgtnsc03.worldnet.att.net>#1/1

Wlad,

I've had problems doing the same thing. That was using 7.3.2 on Novell. I havn't had occasion to try it since we moved to 7.3.4 on NT. I assumed there was some issue of PL/SQL not quite keeping up with the advances in SQL syntax. The work around I used was to create a view to replace the subquery, and then have PL/SQL select from that view.

regards,

Jonathan Gennick

On 12 Jun 1998 17:39:40 +0300, "Wlad.M"
<wlad.m_at_mailexcite.com> wrote:

> Hi!
>
> I'am running Oracle 7.3.3 on WinNT40 and
>
>> SQL> declare
>> 2 cursor c1(a number) is
>> 3 select Q.* from (select * from dba_tables where a=1) q
>> 4 where q.table_name = 'ABC';
>> 5 begin
>> 6 for w1 in c1(1) loop
>> 7 null;
>> 8 end loop;
>> 9 end;
>> 10 /
>>
>
> causes same error
>
>------------------------------------------------------
>Error PLS-00320 the declaration of the type of this expression is
>incomplete or malformed :
>
>cursor curs(param integer) is
>select Q.* from (select st.* from some_table st where st.id<param) Q where
>Q.txt is not NULL;
>------------------------------------------------------
>Success, but no indexes used:
>
>cursor curs(param integer) is
>select Q.* from some_table Q where Q.id<param and Q.txt is not NULL;
>------------------------------------------------------
>
>Regards, Wlad.M.
>
>
>Peter H. Larsen <plarsen_at_dc.dynares.com> wrote
><358123BC.B28D8A37_at_dc.dynares.com>...
>> Hi!
>>
>> Huh??
>> SQL> declare
>> 2 cursor c1(a number) is
>> 3 select Q.* from (select * from dba_tables where a=1) q
>> 4 where q.table_name = 'ABC';
>> 5 begin
>> 6 for w1 in c1(1) loop
>> 7 null;
>> 8 end loop;
>> 9 end;
>> 10 /
>>
>> PL/SQL procedure successfully completed.
>>
>> What version are you running this on?
>>
>> - Peter H. Larsen
>> Oracle Consultant
>>
>> Wlad.M wrote:
>> >
>> > Hello All !
>> >
>> > Please help
>> > Why PL/SQL dont understand this:
>> >
>> > cursor curs(param integer) is
>> > select Q.* from (select * from some_table where
 id<param) Q where Q.txt
>> > is not null;
>> >
>> > Regards, Wlad.M.
>>
Received on Sat Jun 13 1998 - 00:00:00 CDT

Original text of this message

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