Try OpenEdge Now
skip to main content
DataServer for Oracle
Initial Programming Considerations : Database design issues : Oracle views
 

Oracle views

Oracle schema objects include views. A view is a presentation of data in one or more tables. The following table lists the level of support available for various types of views.
Table 5. Supported Oracle views
View
Supported ABL
All columns from a single table:
SELECT custnum, name, postalcode
...
FROM customer
Full support for this view. Use the USE-INDEX option with FIND NEXT statements to get the same results you would expect from ABL.
Some columns from a single table:
SELECT custnum, name FROM
customer
Full support for this view. Use the USE-INDEX option with FIND NEXT statements to get the same results you would expect from ABL.
All columns from a single table with an expression:
SELECT custnum, UPPER(name),
postalcode...
WHERE postalcode < 20000
FROM customer
Full support for this view, except that you cannot update the column with the expression (name, in this example).
All columns from a single table with an aggregate or function:
SELECT custnum, name, postalcode
...
WHERE postalcode < 20000
FROM customer
GROUP BY postalcode
The only supported statements are:
FOR EACH ...
NO-LOCK |SHARE-LOCK:
FIND ... NO-LOCK|SHARE-LOCK:
Columns from multiple tables:
SELECT custnum, name,
postalcode, ordernum
FROM customer, order
WHERE salesrep = 'HXM'
The only supported statements are:
FOR EACH ...
NO-LOCK |SHARE-LOCK:
FIND ... NO-LOCK|SHARE-LOCK:
Oracle views appear as tables in the Data Dictionary's table list for the schema image, not as views. The Data Dictionary's SQL View Report does not list Oracle or other non-OpenEdge views. Nor can you access them through the PRO/SQL menu functions.
In addition, ABL does not allow you to undo the deletion of a record with a view name inside a subtransaction block, so you must perform the deletion inside a transaction block. If you delete a view in a subtransaction block and then try to undo the deletion later, ABL returns a run-time error. See OpenEdge Getting Started: ABL Essentials for information on subtransactions.
* Multi-table views
* Views containing aggregates