Painting Blue Code
Simple, self-explanatory code snippets.
2011-09-21
TSQL - Removing leading zeroes
select
substring
(
ColumnName
,
patindex
(
'%[^0]%'
,
ColumnName
),
8000
)
from
(
select
'00010A0'
as
ColumnName
union
all
select
'sdfa'
union
all
select
'00001'
)
as
V1
;
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment