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 |
|
learntsql
524 Posts |
Posted - 2010-03-05 : 09:34:21
|
| Hi All,I have two result sets let say Set A and Set B,The eliments in set A are 1,2,4 and in set B are 2,3,4.My requirement is to display the eliments which are non mapped.i.e Output should be 1,3TIA. |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2010-03-05 : 09:39:18
|
| Post the code that procedures two resultsetsMadhivananFailing to plan is Planning to fail |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2010-03-05 : 09:43:24
|
| do you mean this?(resultset1exceptresultset2)union(resultset2except resultset1)------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
 |
|
|
learntsql
524 Posts |
Posted - 2010-03-05 : 09:50:42
|
| Yes, but should repeat result sets 4 times.Is there any other way doing this or should i follow this.plz. guide me. |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2010-03-05 : 09:52:08
|
quote: Originally posted by learntsql Yes, but should repeat result sets 4 times.Is there any other way doing this or should i follow this.plz. guide me.
results sets 4 times how?------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
 |
|
|
learntsql
524 Posts |
Posted - 2010-03-05 : 10:00:47
|
I mean before union it evaluates result1 and resultset2and after union it evaluates result2 and resultset1.correct me if i am wrong. quote: Originally posted by visakh16 do you mean this?(resultset1exceptresultset2)union(resultset2except resultset1)------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/
|
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2010-03-05 : 10:02:53
|
| Did you see my first reply?MadhivananFailing to plan is Planning to fail |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2010-03-05 : 10:06:23
|
| then use temp tables to hold them and use them in my suggestion instead------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
 |
|
|
|
|
|