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)
 Formatting numbers

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2000-11-08 : 00:15:35
JB writes "Is there any way to format numbers located in the database so that when they have a different number of decimals on output the decimal will be lined up. Also, I need commas inserted in correct locations.

Example:

45256.1
12.567126
4998.0003
5
would show as

45,256.100000
12.567126
4,998.000300
5.000000
Having six decimal places is a valid amount in the database I am involved with.

I can grind it out using a lot of formatting functions for the one field but I was wondering if there was any quick way to do it.

Thanks,

JB"
   

- Advertisement -