Clay Clay - 7 days ago 6
SQL Question

What is wrong with this sub query?

select lunch_date
from l_lunches
where employee_id = (select employee_id
from l_employees
where hire_date < #1/1/2000#;)


Getting an error statement stating " at most one record can be returned by this subquery"

Thank you in advance

Answer

Try:

select lunch_date
from l_lunches
where employee_id IN (select employee_id
from l_employees
where hire_date <  #1/1/2000#;)
Comments