Re: How can I conserve the initial zero when convert numeric to string using STR()
- From: "Cimode" <cimode@xxxxxxxxxxx>
- Date: 29 May 2006 03:27:49 -0700
Something like this may help...Assuming your column name is COLUMN1 and
COLUMN1 has a numeric type.
select case
when COLUMN1 < 10 then '0' + cast(COLUMN1 as varchar(10))
end
when COLUMN1 > = 10 then cast(COLUMN1 as varchar(10)) end
.......(rest of your statement...)
Hope this helps...
.
- References:
- Prev by Date: Re: SQL syntax question
- Next by Date: Re: How can I conserve the initial zero when convert numeric to string using STR()
- Previous by thread: Re: How can I conserve the initial zero when convert numeric to string using STR()
- Next by thread: Re: How can I conserve the initial zero when convert numeric to string using STR()
- Index(es):