troubleshooting Question

Simple SQL Joining Query Issue

Avatar of piemckay
piemckay asked on
Microsoft SQL Server
2 Comments1 Solution380 ViewsLast Modified:
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
ASKER CERTIFIED SOLUTION
michalsmiechowski

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 2 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 2 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros