Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

without passing any parameters in the package.proc if it has any calling proc/fun in the For loop

994122Jan 8 2015 — edited Jan 12 2015

Hi all,

I am Executing sample1.proc1 without passing any parameter, is this giving messages which are calling in the FOR Loop in the proc1?

CREATE OR replace pkg BODY sample1

IS

PROCEDURE proc1(p_number IN VARCHAR2 DEFAULT NULL)

IS

  CURSOR c_1(v_number VARCHAR2 )

  IS

    SELECT item_number,

           col2

    FROM   TABLES

    WHERE  order_number=v_number;

BEGIN

  FOR c_rec IN c_1((p_number)

  LOOP

    item_id(c_rec. item_number,v_item_id);

    IF Nvl(v_item_id,0) > 0 THEN

       Proc_item(c_rec.col2,v_item_id,v_sequence_id );

      IF Nvl(v_sequence_id,0) > 0 THEN

        dbms_output.Put_line('the Sequence id is alreday Existing');

PROCEDURE item_id (v_item_number IN VARCHAR2,

                   v_item_id OUT NUMBER)

IS

   BEGIN

        SELECT item_id

        INTO   v_item_id

        FROM   table3

        WHERE  col3= v_item_number;

      

    END;

END item_id ;

End;


Thanks


Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 9 2015
Added on Jan 8 2015
13 comments
2,452 views