I would like to know what approach do you use when you use PL/SQL Function Body? Do you also use just short
Return SameValue;
or do you always use full syntax
Declare / Begin / End
around code (like I see in doc or some examples)?
For example I have couple of Dynamic Actions with Action
Set Value
. Under Settings I selected
PL/SQL Function Body
. This function call my user function from Package, because I have this action on many items:
So I wrote inside:
Return MyPackage.MyFunction(:P1_VALUE_01, MyCriteria);
and everything work fine (assumed that I handle errors in my function). Can I just leave this that way OR do I have to always use Declare / Begin / End (or at least Begin / End) as good practice around my calling function:
Declare
l_Result VarChar2(5);
Begin
l_Result := MyPackage.MyFunction(:P1_VALUE_01, MyCriteria...);
Return l_Result;
End;
All suggestions and opinions are welcome.