SELECT
a.*
,b.*
FROM
TableA a
FULL OUTER JOIN TableB b
ON a.id = b.id
WHERE
a.id IS NULL
OR
b.id IS NULL
(Untested)
M!ke
-----Original Message-----
From: Jim McAtee [mailto:[EMAIL PROTECTED]
Sent: Monday, February 11, 2008 8:38 PM
To: CF-Talk
Subject: Query Help - find unique rows in two similar tables
I have two tables with identical structures. The data in the two tables
is _nearly_ identical, with one table having a few additional rows. I
need to find those additional rows.
I want to query the two tables and find the rows in one or the other
that are not present in both. It would be OK to run two queries - show
the rows in table A that aren't present in table B, then a second query
to do the opposite. The primary keys in the two tables are _not_ the
same, so rows must be deamed the same by examing a combination of three
other columns.
I've found some examples of queries to finding duplicate rows in two
similar tables, but not the inverse. And most of those examples use the
primary key.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w
Archive:
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:298766
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4