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!

Pass input parameter of a procedure in to insert command...????

User_7GSDJAug 27 2013 — edited Aug 27 2013

Hi all

I have a requirement where I need to Pass the input parameter of the procedure in to the insert command inside the procedure....

my procedure goes on like this...

PROCEDURE pmproc_1 (

   A   IN   VARCHAR2,

   B       IN   VARCHAR2,

   C         IN   VARCHAR2

)

AS

BEGIN

   INSERT INTO my_table

               (number , activity, done )

      SELECT number , activity, done

        FROM abcd_actv_tbl

       WHERE activity = A

         AND done >= B

         AND number = C;

   COMMIT;

   NULL;

END pmproc_1;

My requirement is I need to pass the input parameter C to a column in my table that is my_table

so that it becomes...

INSERT INTO my_table (number , activity, done, (HERE I NEED TO GET THE "C" VALUE )

      SELECT number , activity, done

        FROM abcd_actv_tbl

       WHERE activity = A

         AND done >= B

         AND number = C;

Please let me know if i am not clear....

Thanks in Advance.......

DEV

This post has been answered by Pablolee on Aug 27 2013
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Sep 24 2013
Added on Aug 27 2013
13 comments
1,207 views