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)
 money datatype truncates

Author  Topic 

matt_calhoon
Posting Yak Master

235 Posts

Posted - 2001-12-03 : 19:50:57
Hi there,

is there any way to stop the money datatype truncating the 0 off the end? For eg:

12.20 will become 12.2

I need to display on the front end (in .asp pages) the full $12.20

any pointers appreciated!

- matt

Merkin
Funky Drop Bear Fearing SQL Dude!

4970 Posts

Posted - 2001-12-03 : 20:10:22
Hey Matt

try this


Declare @x money

Set @x = 12.2

Select Cast(@x as varchar)


and thanking me will take you to 100 posts



Damian
Go to Top of Page

matt_calhoon
Posting Yak Master

235 Posts

Posted - 2001-12-04 : 23:02:50
Howdy Merkin,

thanks for that! I found the FormatCurrency vbscript to be useful for this one (dont know why I didnt use it before - probably because it wasnt supported on NT and now we use win2k)

Hey - how come the "email post replies" feature has been taken off this site?

...woo hoo 100 posts!

Go to Top of Page
   

- Advertisement -