CREATE FUNCTION PadLeft(@PadString nvarchar(100), @PadLength int) RETURNS nvarchar(200) AS begin return replicate(' ',@padlength-len(@PadString)) + @PadStringend goprint dbo.PadLeft('123.456', 20) print dbo.PadLeft('1.23', 20)
No comments:
Post a Comment