Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 Other Forums
 MS Access
 Want to display entry relating to an ID of table

Author  Topic 

Elwood
Starting Member

4 Posts

Posted - 2004-09-23 : 04:56:00
I am creating an updatable Football league website:

I have a table called Divisions with two columns: division_ID and Division, where Division is the label and division_ID is the value.
I have another table called Teams with the division_ID value, how do I display the Division label on a page with the Teams data?

I have a relationship of one to many on the Division_ID field, do I need to create a query in Access to display the labels when it gives a value? How do I do this?

timmy
Master Smack Fu Yak Hacker

1242 Posts

Posted - 2004-09-23 : 19:15:42
The following query will return all teams and their division names. Note that only Teams with a division that exists in the Divisions table will be displayed. You can use this as the basis of your teams display:
SELECT T.TeamName, D.Division
FROM Teams T INNER JOIN Division D ON T.Division_ID = D.Division_ID
Go to Top of Page
   

- Advertisement -