Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations John Tel on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

show text instead of ID

Status
Not open for further replies.

Greg553

MIS
Jul 6, 2009
60
US
I'm trying to show the text associated with the ID field.
I have three tables

playerinformation
sportsidentification
sportspositions

the sports Identification table has:

sports_ID
Sports

Sports position table has

Position_ID
Sports_ID
Positions

I'm storing the sport_ID field (numeric)
I want to show the sport in the report and query.
I'm not sure how to reference this
The SQL code is below.

SELECT tbl_playerInformation.Fname, tbl_playerInformation.Lname, tbl_playerInformation.sport1, tbl_SportPositions.Positions
FROM (tbl_sportIdentification INNER JOIN tbl_SportPositions ON tbl_sportIdentification.Sports_ID = tbl_SportPositions.Sport_ID) INNER JOIN tbl_playerInformation ON tbl_sportIdentification.Sports_ID = tbl_playerInformation.sport1;

 
SELECT tbl_playerInformation.Fname, tbl_playerInformation.Lname, tbl_playerInformation.sport1, tbl_SportPositions.Positions[!], tbl_sportIdentification.Sports[/!]
FROM (tbl_sportIdentification
INNER JOIN tbl_SportPositions ON tbl_sportIdentification.Sports_ID = tbl_SportPositions.Sport_ID)
INNER JOIN tbl_playerInformation ON tbl_sportIdentification.Sports_ID = tbl_playerInformation.sport1

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Thanks, that got the sport to print but now i get every sport and position for all the sports for every kid.
How do i limit it to just the sport chosen fo0r each athlete.



 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top