ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   changing parameter in SQL query from Excel (https://www.excelbanter.com/excel-programming/418585-changing-parameter-sql-query-excel.html)

Kai[_3_]

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



All times are GMT +1. The time now is 01:26 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com