This discussion is archived
1 2 Previous Next 15 Replies Latest reply: Feb 5, 2013 6:12 AM by user12071749 Go to original post RSS
  • 15. Re: Sql to stored procedure
    user12071749 Newbie
    Currently Being Moderated
    It looks like the original script was written to run in a SQL*plus session. If so, the variables prefixed with & are sql*plus Substitution Variables. If you wish to convert the sql script to a stored procedure, you will need to pass 4 parameters to the procedure and replace the substitution variables with the parameter names
    eg.
    CREATE OR REPLACE PROCEDURE sample_ord_sync_wrapper (
      debug_mode_in NUMBER
     ,debug_level_in NUMBER
     ,include_IC_Ord_in VARCHAR2
     ,oid_in VARCHAR2
    )
    AS 
    ....
    p_debuglevel => debug_level_in,
    p_debugmode => debug_mode_in,
    ....
    ....
    l_p_include_IC_Ord := include_IC_Ord_in;
    l_p_oid := oid_in;
    ....
    Edited by: user12071749 on Jul 23, 2012 3:20 AM
1 2 Previous Next

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points