Forum Stats

  • 3,769,346 Users
  • 2,252,951 Discussions
  • 7,874,992 Comments

Discussions

How to dynamically get proc/func params?

JackK
JackK Member Posts: 678 Bronze Badge
edited Feb 7, 2021 4:22PM in SQL & PL/SQL

Hi All!

I would like to refer to my old question:

Is this possible nowadays? I am now using Oracle 19c.

Many thanks.

Answers

  • Paulzip
    Paulzip Member Posts: 8,494 Blue Diamond

    Your requirement of

    err.ac_params('proc1');
    

    Is flawed, as the scope of the proc1's params is only local to Proc1 unless you pass them to another proc explicitly. If you hand off to another procedure, just by name, Proc1's parameters will be pushed onto the stack, so are no longer available to the ac_params proc.

    You'd either have to handle the params locally within Proc1, which means you couldn't easily refactor a one solution fits all, or you'd have to pass the list of params to ac_params, which you don't want to do.