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.
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 MVPhttp://visakhm.blogspot.com/ |
|
|
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.CountriesUNION SELECT Country FROM db2.dbo.Countries...- LumbagoMy blog-> http://thefirstsql.com/2011/07/08/how-to-find-gaps-in-identity-columns-at-the-speed-of-light/ |
|
|
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 - LumbagoMy blog-> http://thefirstsql.com/2011/07/08/how-to-find-gaps-in-identity-columns-at-the-speed-of-light/ |
|
|
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 MVPhttp://visakhm.blogspot.com/
Hi got the solution with ur replythank you |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2011-09-28 : 01:40:54
|
welcome------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
|
|
|
|
|