Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 SSIS and Import/Export (2005)
 SSIS package from different databases

Author  Topic 

avlakshmi77
Starting Member

15 Posts

Posted - 2011-09-27 : 04:17:02
Hi
I want to get different databases data place it into one destination database.
Here i am getting the country information from 3 databases
In destination i want to place only the unique countries.

can any one help me........

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2011-09-27 : 04:43:47
use a union all transformation and then add a sort and distinct to get distinct set out of them.

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page

Lumbago
Norsk Yak Master

3271 Posts

Posted - 2011-09-27 : 07:40:40
Or just use UNION. It will rule out any duplicates values:

SELECT Country FROM db1.dbo.Countries
UNION
SELECT Country FROM db2.dbo.Countries
...

- Lumbago
My blog-> http://thefirstsql.com/2011/07/08/how-to-find-gaps-in-identity-columns-at-the-speed-of-light/
Go to Top of Page

Lumbago
Norsk Yak Master

3271 Posts

Posted - 2011-09-27 : 07:41:51
Just forget my entire post...I missed the ssis-part of things

- Lumbago
My blog-> http://thefirstsql.com/2011/07/08/how-to-find-gaps-in-identity-columns-at-the-speed-of-light/
Go to Top of Page

avlakshmi77
Starting Member

15 Posts

Posted - 2011-09-28 : 01:07:30
quote:
Originally posted by visakh16

use a union all transformation and then add a sort and distinct to get distinct set out of them.

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/






Hi
got the solution with ur reply
thank you
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2011-09-28 : 01:40:54
welcome

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page
   

- Advertisement -