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

Strange behaviour in PL/SQL (IF ignored)

From: Sascha Kiefer <Sascha.Kiefer_at_PIKON.com>
Date: 12 Sep 2001 01:51:03 -0700
Message-ID: <4806fb87.0109120051.3a017cd7@posting.google.com>


Hi,

I've got a strange beaviour in the following piece of code:

procedure ReadCatalogByParent	(acustid in number,
                         aprojid in number,
                         ainstid in number,
                         acatalogname in varchar2,
                         alanguageID in varchar2,
			 acountryID in varchar2,
                         acustomergroupid in varchar2,
                         aparentID in number,
			 atreecursor out tree_cursor,
                         aoffertypecursor out article_cursor,
			 aerrornr out number,
			 aerrormsg out varchar2) is

begin
  if aParentID = 0 then

            open atreecursor for select * ...
  else

     open atreecursor for select *
       from ...

     open aoffertypecursor 
       for select a.product_id, ...

  end if;

When I call this procedure with aparentid = 0 the first open cursor in the if block is processed. Then the second open cursor in the else block is called ???

I've tried to pack the second open cursor into an own if block with if aprentid=0 and this statement is just ignored (although parentid is 0, because in the first called it's correctly handled).

The procedure on another oracle server is running correctly.

Can somedbody tell me what's wrong with my oracle, or where we can start search ? Because I've got no idea what the problem is or where it comes from !!!

Thanks in advance

Sascha Received on Wed Sep 12 2001 - 03:51:03 CDT

Original text of this message

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