We help IT Professionals succeed at work.
Get Started

Simple SQL Joining Query Issue

piemckay asked
Last Modified: 2012-07-11
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.

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
Watch Question
This problem has been solved!
Unlock 1 Answer and 2 Comments.
See Answer
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE