This content has been marked as final. Show 4 replies
Is there any benefit in doing so?No.
I would have directly use parameter (pi_q_nm) without assigning to any other local variable because it is less coding.Agreed.
I recall an example on AskTom, going a bit more in-depth and stating more or less the same, I'll post that thread here as soon as I found it back.
No real benefit. Only issue I can think is possibly if using NOCOPY parameters. Of course by making a copy anyway you are making the NOCOPY pretty redundant!1 person found this helpful
Hello,1 person found this helpful
it is necessary to do so, when the parameter of the called procedure is an out parameter, because you cannot asign a value to the in parameter of the calling procedure. I don't know any other reason to do so.
Recall one really huge procedure with 30+ parameters where this was done and the critical proc changed in every major and minor release. As the local variables were defined(for each parameter defined in the proc) we could pull the code out and quickly convert it into a sql block and assign values to the required variables for testing multiple scenarios quickly. Well, that may not be a justifiable reason to propagate it as a standard but it was definitely convenient in a way.1 person found this helpful