I have an SQL query that runs in SSIS to load data into a CSV file that looks something like this:
SELECT * FROM SomeTable WHERE SomeDate BETWEEN '1-Jan-2016' AND '31-Dec-2016' AND Param1 = 2 AND Param2 = 2
When it was written in QlikView, I used the following parameters:
SELECT * FROM SomeTable WHERE SomeDate BETWEEN '1-Jan-2016' AND '31-Dec-2016' AND Param1 = $(Param1) AND Param2 = $(Param2)
Now that I am transferring the entire task to SSIS, I will figure out how to get it so that Param1 and Param2 are dynamically assigned. For example, in QlikView, I created a table populated with another query:
SELECT Param1, Param2 FROM ThisTable WHERE SomeID = 1
Something like that. Choosing Param1
and Param2
from this query gets me the necessary values ββfor $(Param1)
and $(Param2)
in my QlikView code.
I'm trying to convert QlikView code to SSIS package now because SSIS is a special ETL tool, while QlikView is not. Is what I am making possible? And if so, how do I do this?
My idea was to wrap it all in a for loop container and stop it after it Param1
last Param1
and Param2
from this request:
SELECT Param1, Param2 FROM ThisTable WHERE SomeID = 1
Basically, I'm trying to avoid having to write my first select statement a thousand times.
Thanks.
If what I am saying does not make sense, please let me know so that I can develop a little more.
source share