Posted by pbassutti on 10/29/07 06:44
Hello,
I'm trying to link two tables... one for Employees and the other for
Timecards
I need to get a list of employees that do not have timecards on an
SPECIFIC DATE
I tried the follonwing
SELECT Employess.EmployeeID
FROM Employees LEFT OUTER JOIN Timecards on Employees.EmployeeID =
Timecards.lmpEmployeeID
WHERE lmpEmployeeID is NULL and lmpTimecardDate = '10/24/2007'
But it doesn't work. However, when I comment the date condition out
(lmpTimecardDate = '10/24/2007') it works all right but It's not what
I need
Another interesting point... if I use the following query... it works
all right
SELECT Employess.EmployeeID
FROM Employees
WHERE Employees.EmployeeID not in (select Timecards.EmployeeID from
Timecards
where TimecardDate = '10/24/2007')
I'd like to be able to use the Left Outer Join option.... Am I doing
something wrong?... or is it that if It doesn't like the condition I'm
usgin in the WHERE clause (TimecardDate = '10/24/2007')
Thanks for your help
Pablo
Navigation:
[Reply to this message]
|