Correlate team id to schedule (1 Viewer)

taball0829

New member
Local time
Yesterday, 23:22
Joined
Feb 23, 2018
Messages
28
I have a table "Scores" to which I need to append teams and bowlers from the tables "Bowler" and "Schedule." The "Schedule" table lists the team id numbers which change each week (The primary key of "Schedule.") I have a query that will give me the the list of teams and bowlers for the entire scheduled season, or just for each week, but the teams always show up in the same order (ascending).

How do I get the correlation to the team order in "Schedule?"
 

Attachments

  • Bowl.accdb
    1.1 MB · Views: 65
  • Bowl_Definitions.txt
    9.2 KB · Views: 59

JHB

Have been here a while
Local time
Today, 05:22
Joined
Jun 17, 2012
Messages
7,732
Could you show (printscreen or Excel sheet) how you want them to show up, (and what is the name of the query)?
 

plog

Banishment Pending
Local time
Yesterday, 22:22
Joined
May 11, 2011
Messages
11,638
I think you need to shelf whatever issue you posted about and fix your tables. Your data is not normalized (https://en.wikipedia.org/wiki/Database_normalization). Look that up, do a few tutorials then apply the ideas to your data.

Looking at the relationship tool, here's the big issues I see with your structure:

1. Circular relationships. There should only be one way to travel between tables, you've essentially created a loops: Scores->Teams->Bowler->Scores). That is incorrect, at least one of those relationships need to go away.

2. Numerated field names. When you feel the need to suffix a field with a number, its time for a new table for that data. You should add data vertically (with new rows) and not horizontally (with new columns). In Scores, Game1, Game2, Game3 should go into a new table, each on its own row. Same thing with Game1Cnt, Game2Cnt, Game3Cnt and the WIG data. I see similar issues with other tables doing the same thing (Schedule, FirecrackerSchedTbl)

3. Storing data as field names. In the League table you have fields for a bunch of offices (President, Secretary, etc.). Just like numerated fields, that data belongs in its own table with one row for each position with the value of the position (President, Secretary, etc.) going into the table itslef as a value not a column name (e.g. PositionType)

Again, forget whatever it is you posted about and focus on fixing your tables. If you don't more issues like what you are posting about will fill your life.
 

Users who are viewing this thread

Top Bottom