I'm a newbie to OpenEdge and I'm trying to limit my result set. OpenEdge doesn't appear to support Limit (10) or select top(10) as many other databases do. Can anyone please let me know how this is done in OpenEdge (10.1b). Thanks
You don't mention your version of Progress, which is critical in this case. TOP is supported by the most recent versions, but only the most recent versions.
Thank you for the reply. I had a couple different versions I was working with, and I suppose I had attempted the select top on the older version which doesn't support it. After another try in 10.1b, it works like a charm. Thanks again.
How nice that you actually have a reasonably current version. It can get very tiring telling people that something is right there ready for use in a reasonably current version only to have them reply that they need it to work in 9.1E ... or 8.3 .... or ...
Can someone tell me how to do this in 9.1C? any help will be appreciated.
I think, this code is running from Progress v.6.x to OpenEdge v.10.x
DEFINE VARIABLE li AS INTEGER NO-UNDO.
FOR EACH Customer FIELDS(CustNum Name City) NO-LOCK:
li = li + 1.
IF li > 10 THEN LEAVE.
DISPLAY CustNum Name.
Unfortunately, there is no such simple construct in SQL unless on has TOP. The only other option I know of is to set FetchLimit.