View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Kai[_3_] Kai[_3_] is offline
external usenet poster
 
Posts: 3
Default changing parameter in SQL query from Excel

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