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 |
|
WJHamel
Aged Yak Warrior
651 Posts |
Posted - 2012-01-10 : 16:10:41
|
| I have two dbs. Arrest and Arresttocompare. The latter was set up with "new" data just to see where there are entries that don't exist in the former. I only used two unique fields in the three tables in the new db. I need to see the instances where the field Arrestno exists in Arresttocompare but does not exist in Arrest. I'm assuming i need to use a join, but what would it look like? The following is not giving me the results i seek.SELECT Arrest.ARRESTNO, Arrest_1.ARRESTNO FROM ARREST.dbo.Arrest Arrest INNER JOIN ARRESTtocompare.dbo.Arrest Arrest_1 ON (Arrest.ARRESTNO <= Arrest_1.ARRESTNO) |
|
|
X002548
Not Just a Number
15586 Posts |
|
|
WJHamel
Aged Yak Warrior
651 Posts |
Posted - 2012-01-10 : 17:01:50
|
| at'll do. thanks |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2012-01-11 : 01:16:05
|
AlsoSELECT *FROM ARRESTtocompare.dbo.Arrest Arrest_1WHERE NOT EXISTS (SELECT 1 FROM ARREST.dbo.Arrest ArrestWHERE Arrest.ARRESTNO = Arrest_1.ARRESTNO) ------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
 |
|
|
|
|
|