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
 Transact-SQL (2000)
 Cast Problem

Author  Topic 

homerjay80
Starting Member

26 Posts

Posted - 2007-07-10 : 16:52:03
Hello,

I need to format a money type column so it outputs like this on the select.

Select rate from table

Ex: 75.50 -->>> 75.5
12.00 -->>> 12

I can't seem to find a cast type that would account for both of these outputs. The closest I came was:

select cast(rate as decimal(6,1)) from table but that would format whoe amounts to examples like 12.

Any thoughts?
Thanks

dinakar
Master Smack Fu Yak Hacker

2507 Posts

Posted - 2007-07-10 : 16:56:10
You should this formatting at the front end.

Dinakar Nethi
************************
Life is short. Enjoy it.
************************
http://weblogs.sqlteam.com/dinakar/
Go to Top of Page
   

- Advertisement -