Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

help with retrieving data from multiple tables

Posted on 2011-10-07
1
Medium Priority
?
192 Views
Last Modified: 2012-06-27
Hello Experts,

Please see my Database Scheme below. I need to retrieve all information from the HealthCourses_CourseSchedules Table that relate to ghaocp_id & ghaoc_id from the HealthCourses_GeneralHealthAwarenessOneCoursesPrograms Table and I need to know the hmi_name from the HealthCourses_HighmarkInstructors.

HealthCourses_GeneralHealthAwarenessOneCourses
ghaoc_id     ghaco_name

HealthCourses_GeneralHealthAwarenessOneCoursesPrograms
ghaocp_id     ghaoc_id     ghaocp_name

HealthCourses_CourseSchedules
csch_id     ghaoc_id     ghaocp_id     hmi_id

HealthCourses_HighmarkInstructors
hmi_id     hmi_name
0
Comment
Question by:asp_net2
1 Comment
 
LVL 17

Accepted Solution

by:
Daniel Reynolds earned 2000 total points
ID: 36931181
try this

Select hccs.*, hchi.hmi_name
from HealthCourses_CourseSchedules hccs
join HealthCourses_HighmarkInstructors hchi ON hchi.hmi_id = hccs.hmi_id
join HealthCourses_GeneralHealthAwarenessOneCoursesPrograms p ON p.ghaoc_id = hccs.ghaoc_id
AND p.ghaocp_id = hccs.ghaocp_id
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article describes how to use the timestamp of existing data in a database to allow Tableau to calculate the prior work day instead of relying on case statements or if statements to calculate the days of the week.
This post looks at MongoDB and MySQL, and covers high-level MongoDB strengths, weaknesses, features, and uses from the perspective of an SQL user.
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …
With just a little bit of  SQL and VBA, many doors open to cool things like synchronize a list box to display data relevant to other information on a form.  If you have never written code or looked at an SQL statement before, no problem! ...  give i…

564 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question