Re: [GENERAL] weird sum() results

2000-01-20 Thread Hitesh Patel
I can understand that. What's weird is that I can do a sum(amount) on the whole table and the value comes out to only My only problem is that the amount field is the money type and doesn't like the casting now. A SELECT SUM(amount::float8) FROM table where state = 'CA'; returns

[GENERAL] weird sum() results

2000-01-19 Thread Hitesh Patel
I have a table with a filed named 'amount' and all the values are positive values, but if i do this: select sum(amount) from table where state = 'CA'; I get a negative number. Doing a select name, amount from table where state = 'CA' and amount < '0'; Returns 0 rows.