Duplicate Rows Missing in Union Query

Urgent assistance needed from fellow Access/Jet gurus to help me repair a glitch in accounting software.

I have a report that is based on a union query.  The union query joins two simple select queries.

Although the output of the underlying queries appears to be correct, when I view the raw output of the union query it has actually removed duplicate rows from the underlying queries.  This is critical because it is reporting transactions for which the dates and amounts may be identical for unique transactions.

Because the report is working in all other aspects, I prefer a solution that does not change the query output beyond restoring the duplicate rows.  Perhaps there is a DISTINCT keyword or equivalent that I need to mess around with?

Here is the raw union query:

TABLE [Report Cash Account Month]
UNION TABLE [Report Cash Previous Balance]
ORDER BY CashTransactionDate;

Should this cause rows to disappear???
LVL 11
Who is Participating?
peter57rConnect With a Mentor Commented:
Union removes duplicates.
Union ALL
miqrogrooveAuthor Commented:
peter57r, thanks for the quick reply.  I believe you are correct.  I flipped open mysql.com and in their language it does default to DISTINCT.  I will accept after some testing. :)
miqrogrooveAuthor Commented:
My tax returns are saved!  Thank you!
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.