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: Strange behaviour in PL/SQL (IF ignored)

Re: Strange behaviour in PL/SQL (IF ignored)

From: Sascha Kiefer <Sascha.Kiefer_at_PIKON.com>
Date: Fri, 14 Sep 2001 12:42:33 +0200
Message-ID: <9nsmtn$k6r$01$1@news.t-online.com>


Because the full statement is:

if aparentID = 0 then

    open atreecursor for select *

        from pik_cse_catalog_catalog_tree
        where cust_id = acustid
        and proj_id = aprojid
        and inst_id = ainstid
        and language_ID = alanguageID
        and tree_id = acatalogname
        and parent is null
        order by text;
else
     open atreecursor for select *
        from pik_cse_catalog_catalog_tree
        where cust_id = acustid
        and proj_id = aprojid
        and inst_id = ainstid
        and language_ID = alanguageID
        and tree_id = acatalogname
        and parent = aparentID
        order by text;

    open aoffertypecursor
        for select a.product_id, ...

end if;

Regards

Sascha

"Michael Bialik" <bialik_at_isdn.net.il> schrieb im Newsbeitrag news:969f8022.0109130427.579b0a0d_at_posting.google.com...
> Why the same cursor "atreecursor" appears twice( inside then and inside
else)?
>
> begin
> if aParentID = 0 then
> open atreecursor for select * ...
> else
> open atreecursor for select *
> from ...
>
> open aoffertypecursor
> for select a.product_id, ...
> end if;
>
>
> Michael.
Received on Fri Sep 14 2001 - 05:42:33 CDT

Original text of this message

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