Copyright © TIBCO Software Inc. All Rights Reserved
Copyright © TIBCO Software Inc. All Rights Reserved


Chapter 5 The Action Statements : GET Statement

GET Statement
The GET statement retrieves the first occurrence in a table satisfying the specified selection criteria. You can specify the retrieval order of the occurrences by using the ORDERED clause.
Retrieving Uncommitted or Committed Data
If you retrieve an occurrence that you updated in the same transaction by specifying a unique primary key value in a GET statement, the uncommitted data is retrieved. Otherwise, previously committed data that does not reflect your update is retrieved from the database. Refer to Database Synchronization Statements for information about committing data.
Locking Considerations
If a GET statement specifies a row that is unique by primary key, then a share lock is taken upon that row.
If a GET is not unique by primary key, then a share lock is taken on the table (or table instance in the case of a parameterized table).
If the keywords WITH MINLOCK appear at the end of a GET statement, and either the GET is ordered by anything but the primary key, or the GET includes selection that is not unique by primary key, then a share lock will be taken on the table (or table instance in the case of a parameterized table) only during GET processing. Once the row to be returned has been determined, the lock will be reduced to a share lock on only that table row.
Exceptions
 
Any exception lower in the hierarchy of the INTEGRITYFAIL group can also be signaled.
Examples
1.
2.
3.
4.
GET EMPLOYEES WHERE REGION='MIDWEST' & DEPTNO =       INPUT.DEPT ORDERED
DESCENDING LNAME;
About the Examples
Example 3 retrieves the first occurrence in the MONTHS table where the value of the MONTH field is equal to MM and the DAYS field has a value greater than or equal to DD. MM and DD are local variables that are assigned a value in the parent rule.
Example 4 orders the occurrences in the MIDWEST instance of the EMPLOYEES table in descending order according to the values in the LNAME field, and then retrieves the first occurrence whose DEPTNO equals the value of the field DEPT of the INPUT table.
See Also
TIBCO Object Service Broker Managing Data about TIBCO Object Service Broker tables.

Copyright © TIBCO Software Inc. All Rights Reserved
Copyright © TIBCO Software Inc. All Rights Reserved