all groups > sql server dts > august 2007 >
You're in the

sql server dts

group:

Itereative Data Flow SSIS Question


Itereative Data Flow SSIS Question Sean
8/31/2007 8:30:02 AM
sql server dts:
I have a data flow that I am preparing, where I am getting a list of values
from a Ole DB datasource, and then I want to query a second ODBC datasource
witht those values. This ODBC datasource requires a "WHERE" clause
containing the data I got from the other database (so select * and then
merging is out), also because it is ODBC and not OLE DB, I can't do a lookup.


Is there any tool that I can do an iterative sql lookup from a query created
from a previous sql query? In other words if my first select gets me values
of 'A', 'B', and 'C', I want:

SELECT * FROM table WHERE Value = 'A'
SELECT * FROM table WHERE Value = 'B'
SELECT * FROM table WHERE Value = 'C'

Re: Itereative Data Flow SSIS Question jhofmeyr NO[at]SPAM googlemail.com
9/3/2007 2:06:12 AM
[quoted text, click to view]

Hi Sean,

I would probably put this inside a ForEach loop iterating through a
recordset created from the first query.

To create the recordset, run the SQL against your first source from an
Execute SQL task and assign the output to a package variable of type
"Object". This is then used as the enumerator for the ForEach loop
container.
For more information on ForEach loops check out
http://msdn2.microsoft.com/en-us/library/ms141724.aspx

Good Luck.
J
AddThis Social Bookmark Button