changing parameter in SQL query from Excel

K

Kai

I am using Excel 2007 and bring data into Excel via an SQL query. How can I
change parameters in the 'Where' clause in Excel without going into the
Connection properties in Excel and changing the parameters in the sql querie
itself?
In the example below I would want to change the DateKey:
SELECT salles
FROM dbo.SalesFact
WHERE (DateKey >= 20080524) AND (DateKey <= 20080929)
Thanks
 

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