Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
cidmi.dovic
Yak Posting Veteran
53 Posts |
Posted - 2007-03-14 : 03:03:02
|
| Hi, a simple question:How can I format numeric values to strings?I mean, I want to add 0 in the left, fo example: Year : 2007 Month : 3 -> 03 Day : 1 -> 01 I take a look in the documentation I've found the FORMAT_STRING cell property but not how to use it.Thanks. |
|
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2007-03-14 : 03:05:43
|
[code]select right('00' + convert(varchar(10), numeric_col), 2)[/code] KH |
 |
|
|
|
|
|