2015-04-11

TSQL - Function to remove leading zeros from a string

ALTER function [dbo].[getNoLeadingZeroes]( @text varchar(max))
returns varchar(max)
as
begin
       return(   substring(@text, patindex('%[^0]%',@text), 8000)   )
end;


No comments:

Post a Comment