help query and table order

Fugey00

New Member
I everyone!

Does anybody know if there is a way that i can browse the table in the order of the query.

I order the query on a field that is in the table too, but when i use a for each on the table the record are not browse in the same order as in the order of the display of the browse.

using 8.3B unix CHUI.

thank's
 

NickA

Member
Not sure you're using queries right

It's a little difficult to tell from your post exactly what you're trying to do. Perhaps a code sample?

If you create a query for a certain sort order then it should return the results in the sort order specified: That's the whole point. You need to use the 'GET' command to run through the query results if you're not using a browse.

EG the following code will return the results from table 'stTrans' ordered by date and time:

Code:
DEFINE QUERY qTransactions FOR stTrans.

OPEN QUERY qTransactions FOR EACH stTrans by TransDate by TransTime.

REPEAT:

    GET NEXT qTransactions.
    IF QUERY-OFF-END ( "qTransactions" ) THEN
        LEAVE.

    DISPLAY qTransactions.

END.

HTH, but if not, send a code sample.
 

Fugey00

New Member
thank's NickA.

i'm new to the progress world, i tought of the get thing, but i was wondering if there was another way of doing my preselection in the browse depending on the order of the query....

thank's again...:chat:
 
Top