assuming that the eagleid is your pk field. If so, this should work.
Also if you want to check to see how many dups you have, the UNION will
join both tables and automatically eliminate duplicate rows. Therefore,
in the union, you should have 11,000,008 records instead of 11,000,000.
SELECT
eagleid
FROM(
SELECT
eagleid,firstname,lastname,middleinit,suffix,city,state,country,dateoffl
ig
ht,aircraft,pilotid
FROM eagles
UNION
SELECT
eagleid,firstname,lastname,middleinit,suffix,city,state,country,dateoffl
ig
ht,aircraft,pilotid
FROM eagles2
)
temp
GROUP BY
eagleid
HAVING count(eagleid) > 1
> -----Original Message-----
> From: Eric Creese [mailto:[EMAIL PROTECTED]
> Sent: Thursday, June 17, 2004 1:55 PM
> To: CF-Talk
> Subject: RE: dta comparison from identical tables, but different data
>
> Per your suggestion I ran the following but no records were returned
and I
> should have had at least eight records that have changes
>
> SELECT
>
eagleid,firstname,lastname,middleinit,suffix,city,state,country,dateoffl
ig
> ht,aircraft,pilotid
> FROM(
> SELECT
>
eagleid,firstname,lastname,middleinit,suffix,city,state,country,dateoffl
ig
> ht,aircraft,pilotid
> FROM eagles
> UNION
> SELECT
>
eagleid,firstname,lastname,middleinit,suffix,city,state,country,dateoffl
ig
> ht,aircraft,pilotid
> FROM eagles2
> )
> temp
> GROUP BY
>
eagleid,firstname,lastname,middleinit,suffix,city,state,country,dateoffl
ig
> ht,aircraft,pilotid
> HAVING count(eagleid) > 1
>
>
> -----Original Message-----
> From: Marlon Moyer [mailto:[EMAIL PROTECTED]
> Sent: Thursday, June 17, 2004 1:32 PM
> To: CF-Talk
> Subject: RE: dta comparison from identical tables, but different data
>
>
> SELECT col1,col2,etc FROM
> (
> SELECT col1,col2,etc FROM TABLE1
> UNION
> SELECT col1,col2,etc FROM TABLE2
> ) temp
> GROUP BY col1,col2,etc
> HAVING count(col1) > 1
>
> Marlon
>
> > -----Original Message-----
> > From: Eric Creese [mailto:[EMAIL PROTECTED]
> > Sent: Thursday, June 17, 2004 12:36 PM
> > To: CF-Talk
> > Subject: SQL: dta comparison from identical tables, but different
data
> >
> > Got a table with approximately 11 columns and 1 million records. I
> have a
> > another table with the same columns and records but want to compare
if
> the
> > data is different. Changes could be in one or more of the columns.
How
> can
> > I compare these. MS SQL2000?
> >
> >
> >
> >
> _____
>
>
>
>
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]

