From: Jeffrey Williams on
John Bell wrote:
>
> Just to complicate things further how about a function?
>
> CREATE FUNCTION AddParams ( @x float, @y float )
> RETURNS FLOAT
> BEGIN
> RETURN @x + @y
> END
>
>
> DECLARE @x float, @y float, @z float
> SELECT @x =1.234, @y =2.123
>
> SET @z = dbo.AddParams ( @x, @y )
>
> SELECT @x, @y, @z
>
> John

John, I don't think this complicates anything at all. It really depends
upon what the actual logic is in the 'InnerProcedure' - but this does
look like just what functions have been designed to do.

I would say that a function is the better solution in this case, unless
there is some logic that prevents a function from being used.

Jeff