Kbase P144886: Need to know in a compound query whether the row limit is applied to the first part of the select st
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  17/04/2009 |
|
Status: Unverified
GOAL:
4GL/ABL: Does the MAX-ROWS option of the OPEN QUERY statement apply to the parent table or to the result set returned by the query as a whole?
GOAL:
How does the the MAX-ROWS option of the OPEN QUERY statement work?
GOAL:
Sample procedure to show the MAX-ROWS option behavior.
FACT(s) (Environment):
All Supported Operating Systems
Progress 9.x
OpenEdge 10.x
FIX:
The MAX-ROWS option of the OPEN QUERY statement applies to the whole result set returned by the query and not to the first table mentioned in the query.
When the following procedure is run against the Sports2000 demo database, it visually demonstrates MAX-ROWS option behavior and how it impacts the rows returned from the result set:
DEFINE QUERY qOrder FOR Customer FIELDS(CustNum),
Order FIELDS(OrderNum),
OrderLine FIELDS(LineNum),
Item FIELDS(ItemNum) SCROLLING.
DEFINE BROWSE bOrder
QUERY qOrder
DISPLAY Customer.CustNum Order.OrderNum OrderLine.LineNum ITEM.ItemNum WITH 10 DOWN TITLE "Order Browse".
DEFINE FRAME fOrder bOrder WITH SIDE-LABELS AT ROW 2 COLUMN 2.
OPEN QUERY qOrder PRESELECT EACH Customer,
EACH Order OF Customer,
EACH OrderLine OF Order,
EACH Item OF OrderLine NO-LOCK
MAX-ROWS 5.
ENABLE bOrder WITH FRAME fOrder.
APPLY "VALUE-CHANGED" TO BROWSE bOrder.
WAIT-FOR WINDOW-CLOSE OF CURRENT-WINDOW.