In addition to what Dragan told you,
You should also learn about concept of preprocessing report output
into cursors, rather then using native tables for reporting.
If you are using native tables to do your reports and you add index every time you need to write report - your databses will become mess over period of time.
On the other hand, by using SQL statement to retrieve your report output into cursor - you can also ORDER it without having to add actual index key
even to a cursor.
BTW nothing wrong with index on temporary cursor.
They can be indexed as you pleased because those indexes
will dissapear together with the cursor when session is over.
This way you can offer your user more then one choice of ORDER for long report.
If you knew all this, then I just bored you to death
[ along with 'old wolfs' like Dragan :) ]
>Thanks! That worked great!
>Colombo.