>I can. But the query with ORDER BY on the initial cursor will be of a different name. And this will lead to making a bunch of changes in the code. So I was trying to stay with the same cursor name to avoid making other changes.
>
>I don't know if you read what Naomi said, but she thinks that the initial ORDER BY should work.
>
>I will have to run some tests.
I stand by my statement. The following works for me
SELECT * FROM (ALIAS()) ;
INTO CURSOR (ALIAS()) ;
ORDER BY ...
--sb--