Simple SQL !??!

  • Thread starter Thread starter Flemming
  • Start date Start date
F

Flemming

Hi,

Table tblRoundAwards have the following fields
ID, RoundID, YearNo, StablefordPoints1, StablefordPoints2, LongDrive, Par3,
Par4

Table tblPlayers have
ID, Initials, *,*,*,*,*

The relations between the two tables are
tblRoundAwards.StablefordPoints1 (many to 1) tblPlayers.ID
tblRoundAwards.StablefordPoints2 (many to 1) tblPlayers.ID
tblRoundAwards.LongDrive (many to 1) tblPlayers.ID
tblRoundAwards.Par3 (many to 1) tblPlayers.ID
tblRoundAwards.Par4 (many to 1) tblPlayers.ID

I need a query that gives me
YearNo, Initials, Count(StablefordPoints1), Count(StablefordPoints),
Count(LongDrive), Count(Par3), Count(Par4)

Thank you using time on my issue,
Flemming
 
I wouldn't go any further without normalizing your table structure. Each
award for each ID (or whatever) should create a record in a related table.

Can you change your structure? If not, you can use a union query to
normalize and then link to your tblPlayers.
 
Hi Duane

I have now changed my database and created an award type and then data is
normalized - so no problems now.

Thanks
Flemming
 
Back
Top