I'm new to SQL Server and I would like to ask a query Suppose I have a function which returns four values like e.g.
set @RetValue=@PendingFlag + @Status + @BTFound + @ValueDate
and RETURN @RetValue
.
Now suppose im invoking this function from another function like suppose:
DECLARE @d VARCHAR(max)
SET@d=dbo.ValidateBTtype(@BType,@ReadBT,@Type,@Id,@ClientId,@Customerno,@InterestDate,@ApplicationType)
In @d
il have all the four values
But what I want to do is I want the returned values and I want to store it separately in local variables like local variable @PendingFlag=
returned value (@Pending Flag
) local variable @Status
=returned value (@Status
) and etc..
Please help me how to store the returned values separately in the second function by invoking the first function