views:

91

answers:

2

Like this question, except T-SQL instead of php.

206275947 = 2062759.47

etc.

The problem I'm running into is that an attempt to SUM the values in this column is overflowing the integer datatype in SQL.

SUM(CONVERT(money,[PaymentInCentsAmt]))

Is just tacking on ".00" to the end of the value. What obvious thing am I missing?

+5  A: 

how about use money/100?

Henry Gao
*slaps forehead* thanks
Chris McCall
+1 for intense arithmetic
snicker
A: 

If you are counting money and especially if youare getting overflows you should try making variables and columns as type decimal that allows as much significance as the calcualations need

Mark