CREATE FUNCTION dbo.PadRight
(@String varchar(100), --Input string to be padded
@Length int, --Length of final string
@PadChar char(1) --Padding character)
RETURNS varchar(100)
AS
BEGIN
WHILE LEN(@String + 'z') <= @Length
SET @String = @String + @PadChar
RETURN @String
END
No comments:
Post a Comment