Incorrect Record Count - Perhaps Corruption?

  • Thread starter Thread starter aybs10
  • Start date Start date
A

aybs10

Here's the gist of a situation I have: I have 2 tables A and B. In one
query (call it Q1) I find all record common to both tables, in a second
query (Q2) I find records that B has that A doesn't have.

I run both queries and write the record count down and add them up -
this doesn't add up to the total number of records of Table B.

Suspecting something fishy, I make a third query (Q3) which is a union
of Q1 and Q2...now the record count DOES add up to the total records of
table B.

Strange but true - I suspect something is corrupted, although I have
just compacted the database and the results are the same. If I proceed
to run update queries, I'm not to confident in where this might go.

Anyone see this before or have experience handling it?
 
What criteria are in your criteria?
And what kind of joins?

Perhaps posting the SQL statement for both queries would help someone see
what's going on. It might also help to know the data type and size of the
fields involved in the joins.
 
Grrrrr....turns out that is was me, kindof. I thought the union query
was just stacking one recordset on top of the other, but it turns out
that it was also throwing away duplicate records....not a behaviour I
suspected. Chrs.
 
Hi Allen - thanks for the response. I could still post the SQL if you
like but I also just responded in a separate message to say that I
determined the problem was in my thinking of how a UNION query worked.
I did not suspect duplicate records would get tossed out of the results
automatically. Thx !
 
Back
Top