Copying one table to another, at same time as appending

D4WNO

Board Regular
Joined
Mar 6, 2012
Messages
64
Hi everyone,

I can't edit the title now, it's supposed to say "copying one TABLE to another", oops [note: title changed now - moderator]
I'll try to explain what I'm looking for as best I can but do please ask questions if I've done a terrible job of it.

To give some background, I run a daily download of fault tickets and I have the below tables set up

Old data
Current data
New data

I'd like to do the below in this order

1) Copy "Current data" to "Old data" (so Old is like an archive).
2) Append "New Data" to "Current Data" AND hopefully at same time, update other entries in "Current Data if they've been updated) - There is a field named "Last Updated" so it'll add anything brand new since the newest one, and then also update any tickets already in there with the updated information.

Is this at all possibl or will I need to do this as entirely seperate options?

Thanks in advance for your help, I really appreciate you taking the time to read this.
 
Last edited by a moderator:

Some videos you may like

Excel Facts

Can Excel fill bagel flavors?
You can teach Excel a new custom list. Type the list in cells, File, Options, Advanced, Edit Custom Lists, Import, OK

b.downey

Active Member
Joined
Oct 16, 2011
Messages
484
During the daily download, how many tables are received?

If there is just a single download, does it include just 'current' tickets? Or something else?

Is there a unique index, like a Ticket number so that duplicates are not introduces in the current table?
 

D4WNO

Board Regular
Joined
Mar 6, 2012
Messages
64
Hi there,

It's just a single table that we download from another system (Remedy), then upload into Access. Yes, it uses "Ticket ID" as the unique ID
 

Norie

Well-known Member
Joined
Apr 28, 2004
Messages
76,235
Office Version
  1. 365
Platform
  1. Windows
What will be in the new table?

Will it have tickets that are in the current table and new tickets which aren't in the current table?

Could it also be missing 'old' tickets?

Have you considered this?

1 Append all data from current table to old table.

2 Delete all records from current table.

3 Append all records from new table to current table.

Would that work?
 

D4WNO

Board Regular
Joined
Mar 6, 2012
Messages
64

ADVERTISEMENT

Stages 2 and 3 won't work - I need to keep what is already in "Current", then add anything brand new from "New" and also update anything in "New" with a last updated date of a date that I select.
 

Norie

Well-known Member
Joined
Apr 28, 2004
Messages
76,235
Office Version
  1. 365
Platform
  1. Windows
Thought that might be the case.

What do you mean by update exactly?

Would you add a timestamp to both new and updated records?
 

D4WNO

Board Regular
Joined
Mar 6, 2012
Messages
64

ADVERTISEMENT

I basically have a list of tickets, all with different statuses and open/closed throughout the day.

I will be updating the "Current" list with anything brand new and also updating anything that has changed since it was last run (this will be signified by the "last updated" field" within the data
 

Norie

Well-known Member
Joined
Apr 28, 2004
Messages
76,235
Office Version
  1. 365
Platform
  1. Windows
You could do this with 2 queries.

The first would be an append query and the second an update query.
 

Norie

Well-known Member
Joined
Apr 28, 2004
Messages
76,235
Office Version
  1. 365
Platform
  1. Windows
Oops, actually 3 queries, another to add the current data to the old table.
 

Watch MrExcel Video

Forum statistics

Threads
1,123,525
Messages
5,602,173
Members
414,509
Latest member
Cdavis7078

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top