Nearly everything you have said will work.
1. You can use linked servers to hook up the DB2 box to your SQL Server:
Easy statement to write, possibly slow (OPENQUERY() is better IMHO than 4
part naming)
2. Put the job numbers you want up to the DB2 box and use a DB2 query to
pull the data
Number of jobs relatively small so fast and the query being performed on DB2
should be quick
3. Bring the DB2 stuff down to SQL Server
Yuck. Too much data and you have no dynmaic filter
4. Loop using a Rowset.
Nope. This will most probably kill you for speed as essentially you will be
looping row*row
I would be testing 1 and 2 myself for speed.
--
Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP)
www.allisonmitchell.com - Expert SQL Server Consultancy.
www.SQLDTS.com - The site for all your DTS needs.
I support PASS - the definitive, global community
for SQL Server professionals - http://www.sqlpass.org
"Martin" <mehughes (AT) srpnet (DOT) com> wrote
Quote:
I have a list of job numbers in a SQL table. I want to write a SQL
statement that can be dropped into a DTS component that will use the job
|
numbers in the SQL table to down load data from DBII. How can I accomplish
this? Can I create a "Join" between the two tables? Do I need to do a
transaction step process where I pick a job number from the SQL list and
create a SQL statement to get the information for that job, then step to the
next job? Do I need to put the SQL table on DBII so I can do the join and
transfer in SQL?
Quote:
I would like to use the most effective/efficient method to get the data.
If have an example of the SQL code, that would be great!!
Thanks... |