>
>Yes, DISTINCT, ORDER BY and GROUP BY are not optimized.
>
>Use a ordered SCAN + buffer + INSERT
>
>* General fields are not supported
>SELECT * FROM MYORDERS WHERE .F. INTO CURSOR result READWRITE
>USE MYORDERS AGAIN ORDER TAGORDERNO
>SCAN NEXT 10
> SCATTER MEMO TO aBuffer
> INSERT INTO result FROM ARRAY aBuffer
>ENDSCAN
>USE
>SELECT result
>
Thank you so much for the suggestion and the code. As I mentioned in another message, I am creating this query from ASP.NET page (via OleDb driver) so I will have to see if I can use SELECT and SCAN there.
"The creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham