I have a stored procedure that generates a random string. I want to assign the result to a new variable @newstring, but am not sure how...
I searched for storedprocs return values, but it seems to be only possible to return integer values.
ALTER PROCEDURE [dbo].[_generateRandomString]
@length int
,@validcharacters nvarchar(50)
AS
BEGIN
...
END
declare @newstring nvarchar(50)
EXEC _generateRandomString 10, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'