External Data Parameters

M

macassist

I can't seem to specify Parameters when getting external data in Excel 2008 using the Actual ODBC driver - is this a limitation of Excel 2008 or of the driver? I've tried putting a prompt for a variable in square brackets (which seems to be the way to do it in PC Excel), and it isn't working. I can't get the Parameters button just before the data is pasted into the sheet, and the Parameters submenu item in the Get External Data item in the Data menu is always greyed out. Help!

Sean
 
J

Jim Gordon MVP

in said:
I can't seem to specify Parameters when getting external data in Excel 2008
using the Actual ODBC driver - is this a limitation of Excel 2008 or of the
driver? I've tried putting a prompt for a variable in square brackets (which
seems to be the way to do it in PC Excel), and it isn't working. I can't get
the Parameters button just before the data is pasted into the sheet, and the
Parameters submenu item in the Get External Data item in the Data menu is
always greyed out. Help!

Sean

Hi Sean,

The secret to creating a parameter query is to use = ? in the WHERE clause.
Copy this query and paste it into SQL View (used against Northwind example).

SELECT Employees.LastName, Employees.Title FROM Employees WHERE
(Employees.Title = ?)

Also, note the syntax using parentheses.

-Jim
--
Jim Gordon
Mac MVP

MVPs are not Microsoft Employees
MVP info
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top