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 2008 Forums
 Transact-SQL (2008)
 Money field extend decimal place

Author  Topic 

micnie_2020
Posting Yak Master

232 Posts

Posted - 2011-10-06 : 04:28:43
Dear All,

I have a table field called money.

When i ty to divide 2 value, it's only return me 4 decimal places.

eg: 333.3333

I need output 333.3333333333 ( 8 to 10 decimal place to get more accurate result.

Pls advise.

Thank you.

m_imran18
Starting Member

14 Posts

Posted - 2011-10-06 : 04:38:15
Declare @USD as money
set @USD=333.33

Select @USD/234

Select @USD/Convert(numeric(18,2),234)
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2011-10-06 : 04:59:39
money has precision only upto 4 decimal places. if you want more in result use decimal,numeric or float

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page
   

- Advertisement -