Discussion Locked

Trouble Querying Database

0 helpful
1 reply
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

I have a table with a list of issues (includes duplicates) associated with a file name. There is a separate query that's linked to this table by file name and includes about 10 calculated fields associated with the file name (no duplicates). I would like to create a query that will add the 10 calculated fields together and sum them up by Issue#. Example:

Table#1
Issue# FileName
CR1 a.txt
CR2 a.txt
CR2 b.txt
CR2 c.txt

Table#2
FileName HrEst STEst BuildEst
a.txt 2 3 4
b.txt 1 4 6
c.txt 2 4 5

So for CR#1 I should get 9 and for CR#2 I should get 31. Understand? Any help would be GREATLY appreciatd. Thanks.

1 reply

by tony hopkinson

Select Table1.Issue, Sum(Table2.Calc1 + Table2.calc2 ...Table2.calc10)
From Table1,Table2 Where Table1.Filename = Table2.Filename

HTH

This discussion is closed to new replies.