Home > Contents > Index >
DELETEREVISION
Deletes a revision of a row from a tracked table.
Syntax
<DELETEREVISION TABLE="TABLE_NAME" ASSET="PRIMARY_KEY" VERSION="VERSION_NUM"/>Parameters
TABLE (required)
- Name of the table containing row whose revision is to be deleted.
ASSET (required)
- Value of the primary key for the row whose revision is to be deleted.
VERSION (required)
- Version of the row to delete. Values for
VERSION_NUM
are:
- "
first
"-delete the earliest revision of row.- "
last
"-delete most recent revision of row.- "#"-delete a specific revision number.
- "
date
"-delete the row revised on the specified date. The date must be in SQL format (yyyy-mm-dd hh:mm:ss) and is expected to be GMT.Description
The
DELETEREVISION
tag deletes a revision of a row from a tracked table. The current user must havertadmin
access to the tracked table to perform this operation. If the most recent revision is locked, deleting the most recent revision also deletes the lock on it.Error Numbers
The possible values of
errno
include:
Value Description -1000 Command failure. Check theerrdetail
variable for the specific variable.Example
This example assumes all
DELETEREVISION
parameters are exposed on an HTML form. It first checks whether the parameters exist, clears any values fromerrno
, then deletes the revision.<!-- Make sure required parameters exist --> <IF COND="IsVariable.tablename=false"> <THEN> <SETVAR NAME="tablename" VALUE=""/> </THEN> </IF> <IF COND="IsVariable.asset=false"> <THEN> <SETVAR NAME="asset" VALUE=""/> </THEN> </IF> <IF COND="IsVariable.version=false"> <THEN> <SETVAR NAME="version" VALUE=""/> </THEN> </IF> <!-- clear out errno --> <SETVAR NAME="errno" VALUE="0"/> <!-- do the unlock --> <DELETEREVISION TABLE="Variables.tablename" ASSET="Variables.asset" VERSION="Variables.version"/> <!-- See if unlock succeeded --> <IF COND="Variables.errno=0"> <THEN> <!-- if succeeded, brag about it --> Delete revision succeeded for <CSVAR NAME="Variables.asset"/><BR/> </THEN> <ELSE> <!-- otherwise, call an error reporting element --> Delete revision failed.<BR/> </ELSE> </IF>See Also
Home > Contents > Index > ![]()
Oracle XML Tag Reference
Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.