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.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Hai

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2006-10-11 : 18:48:55
Karthi writes "How to i get the values for this format,
if i want to give 67 means,i want to get this type of output

00067.

by
Karthi"

robvolk
Most Valuable Yak

15732 Posts

Posted - 2006-10-11 : 18:50:17
SELECT Right('00000' + cast(67 as varchar), 5)

...or...

SELECT Replace(Str(67, 5, 0), ' ', '0')
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2006-10-11 : 20:57:17
Where do you want to show data?
If you use front end application, do formation there

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page
   

- Advertisement -