If I use a variable the query returns no result.
If I hardcode some value I know is in the table it works 100%.
What is wrong here?
Thanks!
If I hardcode some value I know is in the table it works 100%.
What is wrong here?
Thanks!
Code:
@employee_name VarChar, @department_name VarChar AS SET NOCOUNT ON SELECT DISTINCT e.naam as employeeName, d.naam as departmentName FROM departments d JOIN emp_dep ON d.id=emp_dep.dep_id JOIN employees e ON emp_dep.emp_id=e.id JOIN hours h ON e.id=h.employee_id WHERE e.naam = @employee_name RETURN
Comment