Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SUM() in SQL statement
Message
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00507278
Message ID:
00507285
Views:
10
Hi!

Do you have any joins in your query? If yes, than sum is calculated for each row of the result set, not for each row of the source table. That is why result is doubled. Post a query and we will suggest how to improve it.

>Anyone had problems with SUM() doubling the result in a SQL statement. If I leave the SUM() command out and hand calculate the column, I get the correct result.
>Thanks...
Vlad Grynchyshyn, Project Manager, MCP
vgryn@yahoo.com
ICQ #10709245
The professional level of programmer could be determined by level of stupidity of his/her bugs

It is not appropriate to say that question is "foolish". There could be only foolish answers. Everybody passed period of time when knows nothing about something.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform