Hi all you clever people
I have the following query (I suppose it is self-explanatory, but...):
select max(a.TransDateNumeric) as ToDate from BI1_DW_Dim_CalendarDefinition a
join BI1_DW_Dim_SystemParameters b on b.RUN_Type = 'SALES' AND
(B.RUN_PeriodFrom = A.TransPeriod OR B.RUN_PeriodTo = A.TransPeriod)
WHERE A.TransDateSmall < DATEADD(D,-1, GETDATE())
GROUP BY A.TransPeriod
which displays the value: 20131105 (you guessed right - it is yesterday's date as an integer value).
I want to run this query in an ssis variable so that it displays the value (at the moment my value display the query itself).
Any help anyone?