- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-27-2022 11:56 PM
Hi,
I'm using an import set.
I want to delete all the records in the table and insert them anew.
What kind of setup is possible?
Regards,
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-28-2022 12:01 AM
First delete all the records using background script. Then import the data
var delGr = new GlideRecord('table_name');
delGr.query();
delGr.deleteMultiple();
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-28-2022 12:01 AM
First delete all the records using background script. Then import the data
var delGr = new GlideRecord('table_name');
delGr.query();
delGr.deleteMultiple();
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-28-2022 12:07 AM
Hi,
Thank you. I want to do it automatically at the time of import, but do I need to respond manually?
Regards,

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-28-2022 12:20 AM
Hi,
Yes, you can use a transform map script to delete records but why not manually do it by simply navigating to Tables >> All. Search by Table name, Open the record & then use Delete All Records button.
How frequent is it & why is there a need to delete records always from target. If it is one time or two try above with no script involved i.e. simply using Delete All Records UI Action.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-28-2022 12:34 AM
Hi,
Thank you.
I don't import it manually.
The job(JDBC File Loader) moves at a fixed time every day and automatically imports data.
I can't work at a fixed time every day...
Regards,