J
jeanulrich00
Hi
I Have 2 access files "Fouka" and "Bouira". Each file have a table
named "Historique"with the exact same structure.
I have create another file named "Fusion"
In the file Fusion I made a link to both Historique tables (from Fouka
and Bouira)
So if I look in the table's section, I have now Historique and
Historique1
I made an union query
SELECT *
FROM [Historique]
UNION SELECT *
FROM [Historique1];
and works fine
Now, let say in the future that I have to join a third table
"Historique2" and a fourth one "Historique3"
to join all the tables, I would need to add to the union query
SELECT *
FROM [Historique2]
UNION SELECT *
FROM [Historique3];
But if for a reason I go down to only 3 links instead of 4, union
query will not work because Historique3 would not exist.
The question is
Is there another way to build a query that would join all tables named
Historique and it would not mather if I have Historique and
Historique1 or Historique and Historique1 and Historique2 or
Historique and Historique1 and Historique2 and Historique3 and
Historique4 and Historique5 and Historique6.
If this is possible, what is the code I should use
thanks
I Have 2 access files "Fouka" and "Bouira". Each file have a table
named "Historique"with the exact same structure.
I have create another file named "Fusion"
In the file Fusion I made a link to both Historique tables (from Fouka
and Bouira)
So if I look in the table's section, I have now Historique and
Historique1
I made an union query
SELECT *
FROM [Historique]
UNION SELECT *
FROM [Historique1];
and works fine
Now, let say in the future that I have to join a third table
"Historique2" and a fourth one "Historique3"
to join all the tables, I would need to add to the union query
SELECT *
FROM [Historique2]
UNION SELECT *
FROM [Historique3];
But if for a reason I go down to only 3 links instead of 4, union
query will not work because Historique3 would not exist.
The question is
Is there another way to build a query that would join all tables named
Historique and it would not mather if I have Historique and
Historique1 or Historique and Historique1 and Historique2 or
Historique and Historique1 and Historique2 and Historique3 and
Historique4 and Historique5 and Historique6.
If this is possible, what is the code I should use
thanks