>>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.
It is a numeric column, N(10,0). I went with the 2 select option, the union to get the data and a second to order it the way I required. thanks.
~M
Go raibh maith agat
~M