Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: cursor using select from subquery
Are you sure that this syntax is good? Have you run this exact same
query in SQL Plus?
>select aup.usid, aup.program, obj.object_name
> from (select usid, program
> from users, programs ) aup,
> program_objects obj
> where obj.program = aup.program
I have never seen a subquery used in place of a table name.
On Thu, 30 Jan 1997 20:22:13 +0100, "Gerard H. Pille" <ghp_at_infosoft.be> wrote:
>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