UNION QUERY

S

Samora

hi everyone:

I have a Union Query that makes the Union of 3 tables

THeader
TDetail
TFooter

However there is a small problem:

i have 817 rows on TDetail and when i make the Union Query
only appears 779 rows.. I dont understand why.

to make this union query i made the following steps:

1 - concatenate all the fields of the 3 tables in 1 single
field

2 - run the query and only appears 779 rows instead of the
817 rows.


What could be happening? I don't really understand why.

Could someone help me????

Thanks in advance
 
B

Brendan Reynolds

Union queries by default eliminate duplicate rows. To include duplicate
rows, use the ALL keyword ...

SELECT FieldName FROM Table1
UNION ALL SELECT FieldName FROM Table2
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

UNION ALL 25
Another Query Question 4
SUM in a UNION query 2
Union query 5
Calculation in SQL Union query 2
UNION QUERY.. 3
Duplicates in union query 3
Run Make Table Query on Union Query 2

Top