View Single Post
  #2 (permalink)  
Old 05-10-10, 07:05 PM
job0107's Avatar
job0107 job0107 is offline
Community Liaison
 
Join Date: Dec 2006
Location: Tacoma, Washington USA
Posts: 3,454
Thanks: 0
Thanked 140 Times in 137 Posts
Well the first thing I see is you have two tables named "Table1" and "Table2".
But in your query string you have "Table1" and "Table".
As long as you only have one entry in your table fields then your query should work fine.
And you don't need the WHILE loop because you are getting only one result.
But if you are trying to use the WHILE loop because you have more than one entry in each table field, then the SUM command will not give you the expected results.
And you will have to SUM each field and do your calculations in your output instead of the query.
__________________
Jerry Broughton
Reply With Quote