Hi, I have all my data in 3 databases each with one table (all of them are defined the same)
Pretty much just, ID, TAG, DATE, VALUE
Each database has a unique autonumbered ID...
Anyway, to run a query for all of them I have been using the UNION operator.
Basically,
Select * from T1 where something
UNION
Select * from T2 where something
UNION
Select * from T3 where something
Now, this is great except sometimes there are duplicate from T1 and T2 or T3, ie. they are unique within each table but once you union them together there are duplicates.
Is it possible to use the large unioned select statement aboce as a subselect? I've looked into this, but this requires me to choose a table..but in this case there are 3 tables altogether (so which one would I choose if I still want data from all of them, just unique to ALL of them not just its individual table).
So, something liek this :
Select * From T?? Where something IN
(
Select * from T1 where something
UNION
Select * from T2 where something
UNION
Select * from T3 where something
)
This requires me to choose one table... Is there someway of doing this? Or maybe create temp table of the subselect statement then query that?
I'm using Access 1997...any help would be great.
Thanks
Frank
Pretty much just, ID, TAG, DATE, VALUE
Each database has a unique autonumbered ID...
Anyway, to run a query for all of them I have been using the UNION operator.
Basically,
Select * from T1 where something
UNION
Select * from T2 where something
UNION
Select * from T3 where something
Now, this is great except sometimes there are duplicate from T1 and T2 or T3, ie. they are unique within each table but once you union them together there are duplicates.
Is it possible to use the large unioned select statement aboce as a subselect? I've looked into this, but this requires me to choose a table..but in this case there are 3 tables altogether (so which one would I choose if I still want data from all of them, just unique to ALL of them not just its individual table).
So, something liek this :
Select * From T?? Where something IN
(
Select * from T1 where something
UNION
Select * from T2 where something
UNION
Select * from T3 where something
)
This requires me to choose one table... Is there someway of doing this? Or maybe create temp table of the subselect statement then query that?
I'm using Access 1997...any help would be great.
Thanks
Frank