dbTalk Databases Forums  

get data from remote DB, using a list of customers locally

microsoft.public.sqlserver.dts microsoft.public.sqlserver.dts


Discuss get data from remote DB, using a list of customers locally in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Kevin
 
Posts: n/a

Default get data from remote DB, using a list of customers locally - 07-19-2006 , 02:16 PM






I have a sqlserver 2000 db that contains a list of customers (~200) and
products codes(~700). There is a DB2 database (that I only have read
access to) that stores sales for all customers and all products (there
are a lot of each). What I would like to do is retrieve sales ONLY for
the customers and products that are on my sql server.

Obviously if the data was all on the same database I could just join on
the tables, but of course it isnt possible as they are two completely
different DBs.

There are too many of both the products and the customers in an IN
list, although I suppose I could split it down into chunks.

I could also do it using a loop and ADO, looping through each customer
and product before dumping into the local database. Although this
would mean performing 140,000 queries, which might not go down too
well. Again I suppose I could group up the products and put them in an
IN list.

There is too much data to retrieve it all and then discard what I dont
need.

I feel like I am missing something obvious here.

Anyone any suggestions?
Thanks in advance
Kevin


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.