linked table queries

Joined
Nov 18, 2011
Messages
1
Reaction score
0
I have two tables linked where Table A, field 1, is a look up table for Table B in Field 1.
Table A has 3 fields and I want to query Table B based criteria in Table A, fields 1 and 2. SQL as follows

SELECT [Table A].[Field 2], [Table B].[Field 2], Sum([Table B].[Field 2]) AS [SumOfField 2]
FROM [Table A] INNER JOIN [Table B] ON [Table A].[Field 1] = [Table B].[Field 1]
GROUP BY [Table A].[Field 2];

I keep getting the error "You tried to execute a query that does not include the specified expression <Table B Field 2> as part of an aggregate function. (Error 3122)
:cry:
 

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

Top