Skip to Main Content

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

Comments
Post Details
Added on Aug 27 2013
13 comments
215 views