Hello,
I am running a query that returns transactions that were done at a given point.
For this, I am using the"connections" part of Excel.
I have created a workbook connection
Connection type : OLE DB Quert
Command Type: SQL
Command Text:
Select
t.SP_ID AS Salesperson
,sum(CASE t.Transaction_Date WHEN '01/05/2012' THEN (abs(t.Transaction_Units) * t.Transaction_Price
etc
It runs finds and returns my data into a table in Excel.
However, I need to manually update the relevant date in the Command Text.
Is there a way that the connection automatically updates the date. as indicated in a cell in Excel, or maybe t-1 given that the file updates automatically every time I open?
MAny thanks