<DB2/INF>: Querying a multi-version view without having set the current version returns the rows for the base table instead of the DEFAULT version.
Last Published: August 25, 2014No Product Found
Bug ID Number
NIM046767
Submitted
July 9, 2009
Last Modified
June 5, 2024
Applies to
No Product Found
Version found
10.0
Version Fixed
N/A
Status
Fixed
The bug has been fixed. See the Version Fixed and Additional Information, if applicable, for more information.
Description
When using a multiversioned view against versioned data in a DB2 or Informix database, issuing a SELECT statement against the view without first setting the geodatabase version returns only the information in the base table.
Cause
The multiversioned view is not defaulting to the DEFAULT geodatabase version.
Workaround
Always set the version before issuing a SELECT statement against the multiversioned view. This must be done before every SELECT statement.
For DB2, call the sde.setcurrentversion stored procedure to set the geodatabase version.
For Informix, execute the sde.set_current_version function.
For more information on working with multiversioned views, see the ArcGIS Desktop Web Help topic, "Using multiversioned views", listed in the Related Information section below.
For DB2, the syntax to call the sde.setcurrentversion stored procedure is as follows:
CALL sde.setcurrentversion('<version_name>',?,?)
For Informix, the syntax to execute the sde.set_current_version function is as follows:
EXECUTE FUNCTION sde.set_current_version('<version_name>')