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 |
vhyn99
Starting Member
3 Posts |
Posted - 2007-10-11 : 02:42:42
|
hi!how can I format a varchar in SQLe.g2598 to 0002598thanks!//vhyn99 |
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2007-10-11 : 03:00:00
|
SELECT RIGHT('0000000' + ISNULL(Col1, ''), 7)FROM Table1 E 12°55'05.25"N 56°04'39.16" |
 |
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2007-10-11 : 04:14:09
|
or if you want to show data in front ends like VB, you can useFormat(Rs("col"),"0000000")MadhivananFailing to plan is Planning to fail |
 |
|
Kristen
Test
22859 Posts |
Posted - 2007-10-11 : 04:14:28
|
ISNULL() COALESCE() |
 |
|
vhyn99
Starting Member
3 Posts |
Posted - 2007-10-11 : 06:51:23
|
thanks guys!//vhyn99 |
 |
|
|
|
|