Trouble Querying Database

  • Thread starter Thread starter Brian.M.Waters1
  • Start date Start date
B

Brian.M.Waters1

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.
 
Select [Issue#], Sum(HrEst) + Sum(StEst) + Sum(BuildEst) As Total
From Table1 Inner Join Table 2 ON Table1.FileName = Table2.FileName
Group by [Issue#]

Hope that helps!
 
That did not work. It gave me some weird numbers.

Jeff said:
Select [Issue#], Sum(HrEst) + Sum(StEst) + Sum(BuildEst) As Total
From Table1 Inner Join Table 2 ON Table1.FileName = Table2.FileName
Group by [Issue#]

Hope that helps!


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.
 
That did not work. It gave me some weird numbers.

Jeff said:
Select [Issue#], Sum(HrEst) + Sum(StEst) + Sum(BuildEst) As Total
From Table1 Inner Join Table 2 ON Table1.FileName = Table2.FileName
Group by [Issue#]

Hope that helps!


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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top