Bill KING wrote:
Kareem Badr wrote:
I should mention that free_space and size are defined as varchars, for
some reason. Not sure if that has anything to do with the issues I'm
seeing.

Do any of these fields contain NULL? as that will definately have an
impact upon both joins and upon calculations. (when using a numeric
field, it's always better to set the field NOT NULL, and default it to 0).

Some of the fields contain NULL, yes, but not in the row that is returned by the query that is returning a single row.

Best I can figure out is that, for whatever reason, when a single row is returned, the division results in 0. When more than 1 row is returned (even if the row has nulls in the field...which one of the rows does), the division works.

Here are the contents of the table:

C: | 71975571456 | 79966171136
D: | |
G: | 206140624896 | 237003182080


I also noticed that in the case where the division worked, the sums are displayed as floats in the resulting row. Very odd.

Reply via email to