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
 Transact-SQL (2005)
 Checking whether two result sets are the same

Author  Topic 

mattt
Posting Yak Master

194 Posts

Posted - 2007-12-05 : 10:49:24
Hi,

I want to check whether the result sets of two select statements (one run against a table in the DB, the other on a temp table with the same structure generated from an XML feed) are the same.

By "the same" I mean contain exactly the same data, irrespective of what order the rows come out in, if that makes sense.

Is there any way I can do this?

Cheers,
Matt

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2007-12-05 : 10:51:31
INNER JOIN, LEFT JOIN, INTERSECT, FULL JOIN, UNION etc etc...



E 12°55'05.25"
N 56°04'39.16"
Go to Top of Page

pootle_flump

1064 Posts

Posted - 2007-12-05 : 10:52:39
try these:

http://weblogs.sqlteam.com/jeffs/archive/2007/04/19/Full-Outer-Joins.aspx
http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=23054&SearchTerms=compare,table
http://weblogs.sqlteam.com/jeffs/articles/60180.aspx
Go to Top of Page
   

- Advertisement -