SQL Server 2005 and padding zeroes

I have a field that is Numeric(8,4)

When a value is 40.25

How do I desplay as
00402500
Larry Bristersr. DeveloperAsked:
Who is Participating?
 
Aneesh RetnakaranConnect With a Mentor Database AdministratorCommented:
SELECT RIGHT('0000'+ cast( CAST(yourNumber*10000 as int) as varchar ) ,8)
0
 
Larry Bristersr. DeveloperAuthor Commented:
aneeshattingal,
 That's why you get the big money!
0
 
Aneesh RetnakaranDatabase AdministratorCommented:
:)
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.