Painting Blue Code
Simple, self-explanatory code snippets.
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
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment