View Single Post
Old 02-13-2013, 10:53 AM   PM User | #2
BubikolRamios
Senior Coder

 
Join Date: Dec 2005
Location: Slovenia
Posts: 1,876
Thanks: 114
Thanked 76 Times in 76 Posts
BubikolRamios is on a distinguished road
this is what you want:
Quote:
6 are not assigned to any departments
this is how to get it:
Code:
SELECT E.last_name
FROM Employees E
LEFT JOIN EmpDepts ED ON E.id = ED.emp_id
WHERE ED.emp_id is null and E.company_index = 63
you don't need to count as count is 0 anyway.
__________________
Found a flower or bug and don't know what it is ?
agrozoo.net galery
if you don't spot search button at once, there is search form:
agrozoo.net galery search

Last edited by BubikolRamios; 02-13-2013 at 10:55 AM..
BubikolRamios is offline   Reply With Quote
Users who have thanked BubikolRamios for this post:
frank727 (02-13-2013)