zxmgh
SSC Eights!
Points: 911
More actions
June 29, 2007 at 7:36 am
#179597
Hi,
I try to convert a number to a n lengh string with leading 0, please help.
25 -> '00000000025'
Ninja's_RGR'us
SSC Guru
Points: 294069
June 29, 2007 at 8:05 am
#716184
SELECT RIGHT(REPLICATE(`0`, 11) + CONVERT(VARCHAR(11), YourNumberColumn), 11) AS FormattedColumn FROM dbo.YourTable WHERE ...
SwePeso
SSC-Dedicated
Points: 39757
July 3, 2007 at 4:27 pm
#717016
SELECT REPLACE(STR(25, 11, 0), ' ', '0')
N 56°04'39.16"E 12°55'05.25"
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply