Avatar of piemckay
piemckay
 asked on

Simple SQL Joining Query Issue

Ok so I have a FK constraint, from tblMeetingRoom to tblFacility, the Primary intFacilityID in tblFacility is a FK in tblMeetingRoom as facilityId. However I am having issues with getting the data I want from tblFacility; I'm not quite sure what I am missing from the SQL syntax but I am sure someone will set me straight.

Query
So you can see how I am trying to get the data from chrFacilityName within tblFacilty by using the relationship betweent intFacilityID and facilityId. However the query doesnt return the correct result. So what syntax do I need or what change to the query do I need to make.


In summary: I want a list of DISTINCT chrFacilityNames WHERE intFacilityID = facilityId
Microsoft SQL Server

Avatar of undefined
Last Comment
piemckay

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
michalsmiechowski

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
piemckay

ASKER
Thats perfect, just put the DISTINCT clause in too! Awesome thanks!
Experts Exchange is like having an extremely knowledgeable team sitting and waiting for your call. Couldn't do my job half as well as I do without it!
James Murphy