replace space as 00:
CREATE PROC USP_PREECED(@NUM VARCHAR(20))
AS
BEGIN
DECLARE @N INT =LEN(@NUM)
DECLARE @I INT =10
SELECT REPLACE(SPACE(@I-@N)+@NUM,' ',0)
END
EXEC USP_PREECED @NUM='13'
AS
BEGIN
DECLARE @N INT =LEN(@NUM)
DECLARE @I INT =10
SELECT REPLACE(SPACE(@I-@N)+@NUM,' ',0)
END
EXEC USP_PREECED @NUM='13'
No comments:
Post a Comment