I am looking for a solution, how to create SQL UDF with optional params.
Pseudocode for function where Param1 is necessary and Param2 may be filled (but not needed):
dbo.myFnc(Param1 int [, Param2 int])
Is there a way to create thislike function? For existing built-in sample watch the STR function
STR ( float_expression [ , length [ , decimal ] ] )