Reputation: 31
How to write query in progress?
How to display all data from Table in Sports database.
Provide me some link for query practice in progress at beginner level.
Upvotes: 0
Views: 2376
Reputation: 1498
The answer above is perfect. But I'll just add the simpler way, because I'm getting a vibe that OP doesn't know much, so it's possible they didn't even formulate the question correctly. So here's the simplest way to display all data from the customer table in sports DB:
FOR EACH customer:
DISPLAY customer with side-labels.
END.
Just look up OpenEdge tutorial and you should be able to find something to teach you the basics. Good luck!
Upvotes: 2
Reputation: 14547
DEFINE QUERY q1 for customer scrolling.
OPEN QUERY q1 for each customer where state='TX'.
Get first q1.
Display name.
Do while NOT QUERY-OFF-END('q1'):
Get next q1.
If AVAILABLE customer then do:
Display name.
End.
Display num-results('q1') label "Number of records".
End.
Reposition q1 (to/forwards/backwards) 5.
get next q1.
display name.
CLOSE QUERY q1.
Define query q1 for customer, order, orderline.
Open query q1 for each customer where state='TX',~
each order of customer,~
each orderline of order.
…
Upvotes: 2
Reputation: 21
If OpenEdge gives error
**FILL-IN Comments will not fit in FRAME in PROGRAM . (4028)
then it means, that default frame for display is not big enough. Width of default frame is 80, but in SportsDB.Customer.Comments is defined with format "x(80)". And it means, that you must handle Comments in this way, that it fits to frame.
One of possible solutions is to use default frame, but handle Comments field in different way:
FOR EACH customer:
DISPLAY Customer EXCEPT Customer.Comments WITH SIDE-LABELS.
DISPLAY Customer.Comments format "x(50)".
END.
Another possible solution can be to use your own frame
DEFINE FRAME demo WITH SIZE 135 by 24.
FOR EACH customer:
DISPLAY customer WITH FRAME demo SIDE-LABELS.
END.
Upvotes: 2