Try OpenEdge Now
skip to main content
DataServer for Oracle
Initial Programming Considerations : Database design issues : Oracle views : Views containing aggregates
 
Views containing aggregates
The DataServer supports access to columns in views that contain aggregates or functions only when the affected column has a name associated with it. Assign specific names to the columns when you define an Oracle view. For example, the following SQL statement names a computed column in a view definition:
CREATE VIEW view-name AS SELECT COUNT(*) cust_count
FROM customer
Use the following ABL syntax to read rows from views that contain aggregates or functions:
FOR EACH view-name { NO-LOCK | SHARE-LOCK } :
You can also access the view by using the RUN STORED-PROC send-sql-statement option to send an SQL statement to select the data from the view. You can access a view by using the send-sql-statement option without adding index definitions for the view in the schema holder. See the InitialProgramming Considerations for more information.