Arithmetic with Numeric Data Type

“The result precision and scale have an absolute maximum of 38. When a result precision is greater than 38, the corresponding scale is reduced to prevent the integral part of a result from being truncated.”

http://msdn2.microsoft.com/en-us/library/aa258274(SQL.80).aspx
http://blogs.msdn.com/sqlprogrammability/archive/2006/03/29/564110.aspx

-- examples
SELECT CAST(820 AS DECIMAL(38,10)) * POWER(CAST(10 AS DECIMAL(38,10)), -9)
SELECT 820.0000000000 * .0000000010
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s