dbTalk Databases Forums  

Re: Collecting data from multiple tables into one

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


Discuss Re: Collecting data from multiple tables into one in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Raman Iyer [MS]
 
Posts: n/a

Default Re: Collecting data from multiple tables into one - 12-10-2003 , 03:42 PM






Forwarding to a more appropriate newsgroup.

--
Raman Iyer
SQL Server Data Mining
[Please do not send email directly to this alias. This alias is for
newsgroup purposes and is intended to prevent automated spam. This posting
is provided "AS IS" with no warranties, and confers no rights.]
..

"Daniel Jonsson" <daniel (AT) it-kompaniet (DOT) net> wrote

Quote:
Hi!

I'm quite new to SQL Server, but has worked with Access for some time.

I receive datafiles once every day, in textfiles. I've set up a DTS import
of the files and now I want to merge the data.
I have three different tables containing products that I would like to
merge into one table. Also, there are duplicates in the tables, so I want
the query to select only one with e.g. highest value.
Quote:
I now how I could kinda' make this work in Access, but there are a total
of 30 000 rows, so I would prefer to do it in SQL.

Any ideas?

Grateful for any help!

Cheers
Jeaz



Reply With Quote
  #2  
Old   
Farooq Mahmud [MS]
 
Posts: n/a

Default Re: Collecting data from multiple tables into one - 12-25-2003 , 06:58 PM






You can make a DTS package with the following characteristics:

1. Source SQL Server Connection.

2. Destination SQL Server Connection.

3. Data pump task in between.

4. The source of the data pump is a query like the following:

select * from table1
union
select * from table2
union
select * from table3

5. The data pump destination is the table that will hold the merged data.

Hope this helps,
Farooq Mahmud [MS SQL Support]

This posting is provided "AS IS" with no warranties, and confers no rights.

Are you secure? For information about the Strategic Technology Protection
Program and to order your FREE Security Tool Kit, please visit
http://www.microsoft.com/security.


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.