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

aman

Registered User.
Local time
Today, 12:05
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
Local time
Today, 12:05
Joined
Oct 29, 2018
Messages
10,681
Hi. Just a guess but try changing your query into a UNION query.
 

pbaldy

Wino Moderator
Staff member
Local time
Today, 12:05
Joined
Aug 30, 2003
Messages
34,202
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, 21:05
Joined
Mar 14, 2010
Messages
162
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 (Users: 0, Guests: 1)

Top Bottom