S
sebastian stephenson
I have a simple Union Qry
Select * from table1
where fieldX = between date1 And date2
And
where field x > date2
order by fieldX
union
Select * from table1
where fieldX = between date1 And date3
And where field x > date3
order by fieldX;
Problem:
The qry is not returning duplicate rows.
I am not using a DISTINCT function in any of the code.
Does anyone know whats going on?
When I run the two queries separately their is a duplicate record that
appears in both data sets. But, when I run the query in the Union, only one
record appears.
For example, data set 1, return 20 values, and data set 2 returns 10 values.
But when I union both data sets, only 25 values are retruned.
Why are the others falling off?
Please help.
Select * from table1
where fieldX = between date1 And date2
And
where field x > date2
order by fieldX
union
Select * from table1
where fieldX = between date1 And date3
And where field x > date3
order by fieldX;
Problem:
The qry is not returning duplicate rows.
I am not using a DISTINCT function in any of the code.
Does anyone know whats going on?
When I run the two queries separately their is a duplicate record that
appears in both data sets. But, when I run the query in the Union, only one
record appears.
For example, data set 1, return 20 values, and data set 2 returns 10 values.
But when I union both data sets, only 25 values are retruned.
Why are the others falling off?
Please help.