help with retrieving data from multiple tables

Posted on 2011-10-07
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.

ghaoc_id     ghaco_name

ghaocp_id     ghaoc_id     ghaocp_name

csch_id     ghaoc_id     ghaocp_id     hmi_id

hmi_id     hmi_name
Question by:asp_net2
    1 Comment
    LVL 17

    Accepted Solution

    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

    Featured Post

    Threat Intelligence Starter Resources

    Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

    Join & Write a Comment

    PL/SQL can be a very powerful tool for working directly with database tables. Being able to loop will allow you to perform more complex operations, but can be a little tricky to write correctly. This article will provide examples of basic loops alon…
    Occasionally there is a need to clean table columns, especially if you have inherited legacy data. There are obviously many ways to accomplish that, including elaborate UPDATE queries with anywhere from one to numerous REPLACE functions (even within…
    Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
    This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor ( If you're looking for how to monitor bandwidth using netflow or packet s…

    746 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

    Need Help in Real-Time?

    Connect with top rated Experts

    18 Experts available now in Live!

    Get 1:1 Help Now