look up - Query - grouping

D

Deena

I need to create a query that groups all the like #'s -
For example - client ID's and display the line items
associated with those id's
 
G

Greg Kraushaar

YOu need to join the two tables together using a common field
(PrimaryKey to ForeignKey is best)
then order by the field you want to use to group the data with
See below for an example

SELECT tblCountry.ID, tblCountry.Country, tblCampDet.CampQtrNum,
tblCampDet.CampYear, tblCampDet.TVT
FROM tblCountry INNER JOIN tblCampDet ON tblCountry.ID =
tblCampDet.CountryID
ORDER BY tblCountry.ID;
 

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