I am trying to use parameters within a pass through query the issue is when I set the statement up I get
Incorrect syntax near '+'. Expecting ')'
I've done this before so I am not sure what I am doing incorrectly now. I've shortened the query below to give the gist.
DECLARE @WORK_DATE AS VARCHAR(20)
SET @WORK_DATE = '20160210'
SELECT * FROM OPENQUERY(DATA_BASE_1,
'SELECT EMPLOYEE.EMPLOYEE_NUMBER AS EMPLOYEE_ID
FROM TABLE_1 EMPLOYEE
LEFT JOIN TABLE_2 PERSON
ON EMPLOYEE.EMPLOYEE_NUMBER = PERSON.EMPLOYEE_NUMBER
AND PERSON.WORK_DATE = '''''+ @WORK_DATE + '''''')