The examples will be based on a copy of the demo database Sports 2000 provided with the setup of Progress.

When working with queries in Progress you need to:

DEFINE the query and set what buffers (tables) and fields it works against.

OPEN the query with a specific WHERE-clause that defines how to retrieve the records. Possibly also sorting (BY/BREAK BY)

GET the actual data - that can be the FIRST, NEXT, PREV (for previous) or LAST matching record.


  • DEFINE QUERY query-name FOR buffer-name. //General query definition for one buffer
  • DEFINE QUERY query-name FOR buffer-name1, buffer-name2. //Joining two buffers
  • DEFINE QUERY query-name FOR buffer-name FIELDS (field1 field2). //Only retreive field1 and field2
  • DEFINE QUERY query-name FOR buffer-name EXCEPT (field3). //Retreive all fields except field3.