Import Set table truncate
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-25-2022 12:39 PM
I have a situation wherein an import set table has no import sets attached to it. I dropped them manually from the data source. Now I see the import set table has over 4 mil rows with no SET attached to it. I have done this sort of a deletion lots of times and I have always had a clean import set table but in this case the table has data. I tried deleting the records by going into the dictionary and that hasn't helped. The only option I see now is delete it thru a background script which could perhaps run for hours. Thankfully it is in our development instance.
Does anybody know of a faster way to do it? I know a table truncate would do it but the GS.SQL option is not allowed. So I am handicapped.
Thanks
- Labels:
-
Team Development
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-25-2022 12:54 PM
Perhaps
var gmd = new GlideMultipleDelete('<table name>');
gmd.execute();

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-25-2022 12:55 PM
Hi,
I'd recommend checking out the "Delete import set tables" feature, pay special attention to point 4 in the referenced documentation (as I assume you want to keep the table and the structure, overall): https://docs.servicenow.com/bundle/rome-platform-administration/page/administer/import-sets/task/del...
Please mark reply as Helpful/Correct, if applicable. Thanks!
Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!