Delete Statements

To delete DMS objects in yuuvis® RAD, you have to execute the delete operation (via yuuvis® RAD management-studio) which takes an eSQL statement as input to select the objects to delete. This page gives you examples of the most commonly used eSQL statements.

Important

  • The sysitemcreationdate field selects the creation date of the entire object (item), whereas syscreationdate selects the creation date of the active version.
  • The datetime identifier takes input of the form yyyy-MM-dd hh:mm:ss". The only required part is yyyy, but all left out parts will be autocompleted with 00
  • Object type names and element (field) names are accessed by their technical names.

See Archiving Statements for examples of deleting by date/time, creator/modifier and metadata/ID criteria.


Statement

Description

Select [o] from [dms]:[sysdocument] as [o], [dps]:[sysbox] [b], [dps]:[sysbox2actualnode] [b2n], [dps]:[sysactualnode] [an] where [o].[sysboxid] = [b].[sysid] and [b].[sysid] = [b2n].[sysid1] and [b2n].[sysid2] = [an].[sysid] and exists (select [s].[sysid] from [dps]:[sysset] [s], [dps]:[sysstorage2set] [s2s], [dps]:[sysnode2storage] [n2s], [dps]:[sysbox2actualnode] [b2n] where [b].[sysid] = [b2n].[sysid1] and [b2n].[sysid2] = [n2s].[sysid1] and [n2s].[sysid2] = [s2s].[sysid1] and [s2s].[sysid2] = [s].[sysid] and [s].[syspermanence] = 'ARCHIVE') and [an].[sysretentiontime] < datetime'2022-07-24'L

This will delete all objects that were archived ([syspermanence] = 'ARCHIVE') and where the rentention time has expired before 24th of July 2022 (00:00).

Note: Change [dms]:[sysdocument] to a specific object type (e.g., [dms]:[invoice]) for more performance. 

Select [d] from [dms]:[sysdocument] [d], [dps]:[sysbox] [box], [dps]:[sysbox2actualnode] [b2n], [dps]:[sysactualnode] [an], [dps]:[sysactualnode2nodeelement] [a2e], [dps]:[sysnodeelement] [ne], [ecm]:[syscreationtraceowner2user] [c2u], [org]:[sysuser] [u] where [d].sysid = [c2u].[sysid1] and [c2u].[sysid2] = [u].[sysid] and [an].[sysid]=[a2e].[sysid1] and [a2e].[sysid2] = [ne].[sysid] and [box].[sysid] = [b2n].[sysid1] and [b2n].[sysid2] = [an].[sysid] and [d].[sysboxid] = [box].[sysid] and [u].[sysname] = 'import' and [ne].[sysname] = 'filename.txt'

This will delete all objects where the creator of the active version is import and the file name of the content file (of the active version) is filename.txt

Notes:

  • Change [syscreationtraceowner2user] to [sysversionedcreationtraceowner2user] to access the creator of the first version of the object.
  • Change [dms]:[sysdocument] to a specific object type (e.g., [dms]:[invoice]) for more performance and to access specific metadata fields of that type.