Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Problem with variable value being lost
On Mar 14, 10:48 am, "fitzjarr..._at_cox.net" <fitzjarr..._at_cox.net>
wrote:
> On Mar 14, 8:29 am, "00steve" <steven_macl..._at_hotmail.com> wrote:
>
>
>
>
>
> > Im having an issue with the following code (snippet posted):
>
> > SELECT ewpm_project_id INTO pro_id FROM ewpm_work_package WHERE
> > ewpm_work_package_id = wp_id;
>
> > --can return pro_id here
>
> > SELECT ewpm_work_package_prefix, LEVEL INTO parent_prefix,
> > parent_level
> > FROM ewpm_work_package
> > WHERE ewpm_project_id = temp_pro_id
> > AND ewpm_work_package_id = wp_id
> > START WITH ewpm_work_package_id = pack_id
> > CONNECT BY PRIOR ewpm_work_package_id = ewpm_work_package_parent_id;
>
> > RETURN pro_id;
>
> > The pro_id value is correctly set during the first select statement, I
> > can return the pro_id in the commented position. However, I can not
> > return the value after the second select statement. All I am getting
> > back is an empty string. If I remove the START WITH.. CONNECT BY
> > clauses in the second query, the pro_id value is returned correcly.
> > Has anyone experienced this before, or know what could be causing it?
>
> > thanks
>
> Not until you provide sufficient information, such as Oracle release
> and O/S-related information (such as which O/S, what patch level,
> etc.).
>
> David Fitzjarrell- Hide quoted text -
>
> - Show quoted text -
Aside from David's comment above, which I agree with and I would add that we need to know what the table data looks like, I can only guess that the hierarhy does not exist the way you try to build it. Received on Wed Mar 14 2007 - 09:52:59 CDT
![]() |
![]() |