I'm pulling data from SQL Server 2008 R2 using Excel 2010 Data Connection. I would like to use a dynamic query for which to pass to the query as follow:
WHERE DATEDIFF (day, HireDate, GETDATE()) < ?
Can it be done? Or I can have a user enter the enter ? in a specific cell and have the sql get the parameter from the cell.
I tried just typing "?", but the parameter button is greyed out.
WHERE DATEDIFF (day, HireDate, GETDATE()) < ?
Can it be done? Or I can have a user enter the enter ? in a specific cell and have the sql get the parameter from the cell.
I tried just typing "?", but the parameter button is greyed out.