I have an SSRS dataset query with a single value parameter called BENEFIT. My datasource is SQL SERVER 2014: The following query gives the error "ERROR [42000] [Microsoft][SQL Server Native Client 10.0][SQL Server]Must declare the scalar variable "@BENEFIT".
SELECT c.BENEFIT FROM CLAIM AS c
WHERE c.DOWNLOAD_DATE > '20150701' AND c.BENEFIT = (@ BENEFIT)
The error exists ONLY when using an ODBC connection and goes away using a direct connection. Without the parameter the query parses correctly using either connection method.
Any thoughts appreciated.
Thanks, Alasdair