>I had the order by just before the into cursor line, I took it out as it was causing the issue. I do normally include table.field name but as I was testing I didn't bother, I was actually building up the select code from a simple 2 fields to try to get to the bottom of it.
>
>order by BTR_link
>into cursor temp2
>
>~M
I think it should have worked (but I need to know the type of that column). In any case, the workaround I suggested with derived table should always work.
If it's not broken, fix it until it is.
My Blog