Archiving a simple database

I am quite new to OutSystems and I am trying to learn to arcive simple databases using OutSystems Best practices data archiving "light archive" method. My database is very simple and I am simply trying to move it's data into a database in another module based on the "LastPlayedOn" timestamp. I have done the needed setups based on this: https://success.outsystems.com/Documentation/Best_Practices/Architecture/Data_Archiving but have a problem with creating the Timer and actually archiving the data. I simply dont know how to do it (correct SQL queries?) after a lot of trying. Is there any tutorial about moving the data between databases and changing the "IsArchived" -attribute based on that

db.jpg

Hi Daniel,

Indeed, what you need is two SQL queries in the Timer that 

1. bulk inserts the records from the main entities to the archive entities

2. marks the moved records as 'archived' 

(as explained in Step 4 and 5 of the link that you sent).

For the 'Bulk Insert Into Select' SQL query, you can check out João's answer in this post. There is an example in his screenshot.

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.