webCOMAND

cQL DELETE and CANCEL Statements

DELETE removes existing objects from the repository.

CANCEL removes any saved drafts or working copy updates to an object, but does not remove the object itself or previous versions, unless there is no active version of the object.

Both statements can include any of the following clauses in any order, but must specify the content type either after DELETE/CANCEL or in a FROM clause.  Use a content type of Object+ to remove objects of any content type.

  • DELETE | CANCEL - Specifies the content type(s) to delete or cancel.  Object+ can be used to specify all content types.
  • FROM - Optional keyword that comes between DELETE or CANCEL and the content type(s) to delete or cancel.  Provided to be consistent with the same keyword in SQL.
  • IN - Restricts results to objects located in a folder or field, specified by a cPath.
  • WHERE - Specifies the filter to apply to the specified content type(s).
  • WITH - Restricts results to objects of one or more content type(s).

  CANCEL is used to cancel any unapproved object drafts or working copy modifications.

DELETE

Remove objects, including any saved drafts and working copy modifications.  One or more comma separated content types may be specified, and content types can include a trailing '+' to also include all content types that extend it.  Object+ specifies all content types.

DELETE Contact WHERE Name='Jenny' AND Phone.Number LIKE '%5309'

CANCEL

Any unapproved object drafts or working copy modifications are removed.  One or more comma separated content types may be specified, and content types can include a trailing '+' to also include all content types that extend it.  Object+ specifies all content types.

CANCEL Contact WHERE OID=123

FROM

Optional keyword that must come between DELETE or CANCEL and the content type.

DELETE FROM Contact WHERE Name='Jenny' AND Phone.Number LIKE '%5309'

IN

Limit removed objects to those found in a specific folder.

DELETE Contact IN /Example/Folder

WHERE

A filter expression with the same options as a SELECT WHERE clause.

CANCEL Contact WHERE Name='Jenny' AND Phone.Number LIKE '%5309'

WITH

If no WITH clause is provided, DELETE and CANCEL act on all dimensions of dimensional content.  If a WITH clause is provided, only the specified dimension(s) will be deleted.

DELETE Contact IN /Example/Folder WITH Fr