1.Script Task: set arrays of (A) inventory count and (B) StoreNr
2.Data flow task: Use the list variables in where clauses (to filter and thereby speed up performance)
*Script task must read from server A and Data flow task from server B.
I dont want to use linked server and dont want to filter downstream the dataflow, but instead want to filter through the where clauses in the dataflow source (OLE DB).
You may do it in two Data Flows.
In first:
ListToBeFetchedas comma separated list using Srcipt Component as destination witch code similar to:Do the same with second list.
In second Data Flow set dynamic generated query as sql command in
OLE DB Source(taken from Jamie Thomson blog):Expressionto"select * from table where columnToBeSearched in (" + @[User::ListToBeFetched] + ")"