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: cursor using select from subquery

Re: cursor using select from subquery

From: Richard G. Ramirez <ou79138_at_deere.com>
Date: 1997/01/31
Message-ID: <01bc0f83$06ea92e0$6ef179a4@proxy.dx.deere.com.wdm.deere.com>#1/1

It doesn't work on PL/SQL 2.1 (maybe even 2.2), meaning Oracle 7.1. It is a pain in the neck. I also have several queries like this to check on tablespaces and other things and to change to PL/SQL I have to rewrite the logic.

I have seen several references that this work in later versions.

Richard

Gerard H. Pille <ghp_at_infosoft.be> wrote in article <32F0F4E5.1D6F_at_infosoft.be>...
> I have a select that works fine:
> select aup.usid, aup.program, obj.object_name
> from (select usid, program
> from users, programs ) aup,
> program_objects obj
> where obj.program = aup.program;
>
> However, if I want to use this query with a cursor within a
> stored procedure:
>
> cursor c_usprobj is
> select aup.usid, aup.program, obj.object_name
> from (select usid, program
> from users, programs ) aup,
> program_objects obj
> where obj.program = aup.program;
>
> the stored procedure gives compilation errors on the first "(".
>
> Does anybody know what's wrong? Is it not allowed to use
> selects from subqueries in PL/SQL?
>
> Kind reGards,
> \ / |
> x s
> / \
> Gerard
>
  Received on Fri Jan 31 1997 - 00:00:00 CST

Original text of this message

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