|
jung1975
Aged Yak Warrior
503 Posts |
Posted - 2010-05-24 : 14:03:14
|
| How can I compare all the set of rows to set of rows .. I am trying to compare #temp1 to #temp2 based on the combination of ROWS ( based on Id) ?How can I do this T-SQL or SSISSelect * into #temp1from (select 1 as ID , 2 as Seq , 1 as valueunion all select 1 , 2 , 1 union all select 1 , 3 , 2 union all select 1 , 6 , 8union all select 2 , 1 , 7union all select 2 , 2 , 10union all select 3 , 1 , 7union all select 3 , 3 , 10)aselect * into #temp2from (select 5 as ID , 2 as seq , 1 as valueunion all select 5 , 3 , 2 union all select 5 , 6 , 8 union all select 10 , 1 , 7union all select 10 , 2 , 10union all select 11 , 2 , 1union all select 11 , 1 , 7union all select 12 , 1 , 7union all select 12 , 3 , 10)bThe output should look likeID ID 5 110 212 3 |
|