Database Management
Reference Manual
Comparisons Across Sessions and Stamps
:
Comparison Date
: Query Any Attribute at the Comparison Date
Query Any Attribute at the Comparison Date
The ‘OLD’ syntax enables you to query any attribute at the comparison date.
You can use the syntax in front of any expression or attribute. The whole expression will then be evaluated at the comparison date. e.g.
Q OLD XLEN
If a name is given, the name will be for the item at the comparison date, not now. Thus values of deleted items may be accessed. e.g.
Q OLD REF OF /OLDPIPE
Where /OLDPIPE no longer exists.
The ‘OLD’ syntax may also be used after ‘VAR’. This includes collections e.g.
VAR !PIPES OLD COLLECT ALL PIPES
This would return a collection of all PIPES at the old version.
If the functions MODIFIED, CREATED, DELETED are used on the old version then the comparison is made with the current version.
For example to get a list of deleted pipes between the comparison date and now, then the following collection could be used. e.g.:
VAR !PIPES OLD COLLECT ALL PIPES WITH ( DELETED() )
There is also a pseudo attribute, DSESS. that returns the session number when an element was deleted. i.e. having got the deleted PIPES from the previous query, we can now find out when they were deleted.
1974 to current year.
AVEVA Solutions Limited and its subsidiaries. All rights reserved.