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: Hierarchical Query Cursor in PL/SQL block

Re: Hierarchical Query Cursor in PL/SQL block

From: James Lorenzen <lorenzen_at_yuck.net>
Date: Fri, 09 Apr 1999 19:14:36 -0500
Message-ID: <090419991914369682%lorenzen@yuck.net>


What is your version ofOracle. The inline view was not supported in 7.1 or 7.2 AFAIK. I believe that the inline view was supported in SQ*Plus at 7.2. I am not certain of teh PL*SQL support for the connect by clause.

James
In article <370D0FEC.44E93C98_at_admin.dce.utah.edu>, Sean McMurray <smcmurr_at_admin.dce.utah.edu> wrote:

>I can run the following query just fine in SQL*Plus:
>
> select Max(lvl) ord, dev_tables.t_name from
> (select level lvl, t_name
> from dev_constraints
> connect by prior t_name=c_ptable) hq,
> dev_tables
> where hq.t_name=dev_tables.t_name (+)
> group by dev_tables.t_name
> order by ord desc;
>
>However, when I try to compile the following, it doesn't work:
>
>CREATE OR REPLACE PROCEDURE build_tables IS
> CURSOR deltab IS
> select Max(lvl) ord, dev_tables.t_name from
> (select level lvl, t_name
> from dev_constraints
> connect by prior t_name=c_ptable) hq,
> dev_tables
> where hq.t_name=dev_tables.t_name (+)
> group by dev_tables.t_name
> order by ord desc;
>
>BEGIN
> NULL;
>END;
>
>I get the following error:
>
> Errors for PROCEDURE BUILD_TABLES:
>
> LINE/COL ERROR
> --------
>-----------------------------------------------------------------
> 3/9 PL/SQL: SQL Statement ignored
> 4/13 PLS-00320: the declaration of the type of this expression
>is
> incomplete or malformed
>
>
>It's probably something really dumb like a misplaced comma, but I can't
>seem to figure it out. Anybody willing to point out my problem for me?
>If so, please cc to my email address, too.
>
>Thanks.

--

lorenzen_at_yuck.net             | Life is complex; it has
                              |   real and imaginary parts
Received on Fri Apr 09 1999 - 19:14:36 CDT

Original text of this message

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