Query to check data in old and new tables (1 Viewer)

aman

Registered User.
Local time
Yesterday, 19:38
Joined
Oct 16, 2008
Messages
1,250
Hi Guys,

I have created a new table which has replaced the old tables due to business needs. Now my report is not pulling through the historical data as it's pointing to the new table. How can I change my query so it will check reference number in old table and if it's there then pull through the data and if it's not then check in new table.

Can we do something similar?

Thanks
 

theDBguy

I’m here to help
Staff member
Local time
Yesterday, 19:38
Joined
Oct 29, 2018
Messages
21,358
Hi. Just a guess but try changing your query into a UNION query.
 

pbaldy

Wino Moderator
Staff member
Local time
Yesterday, 19:38
Joined
Aug 30, 2003
Messages
36,118
Short version, you can't. You can create a UNION query that joins the two tables together, or modify the report's record source dynamically.
 

Anakardian

Registered User.
Local time
Today, 03:38
Joined
Mar 14, 2010
Messages
173
Any reason you don't want to move the old data into the new table?
that would solve the issue a lot simpler
 

Users who are viewing this thread

Top Bottom