Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SQL sub query Help

Status
Not open for further replies.

vzjfgm

Programmer
Jul 24, 2003
34
US
I am working on a query that links two tables. Table 'A' is a list of employees. Table 'B' is a list of employees with safety visits. I want to create one query with all employees and any safety visits YTD. My issue is when I select the Safety visits for Year 2009. I get only the employees that had visits in 2009. I need all employees even if did not have a safety visit. How can I do this in SQL with out multiple queries?

Thank you very much!!!
 
Use a LEFT JOIN ?

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top