My manager asked me the same question. I said, there is nothing I can do about it and we have to choose the order ourselves.
>>Hi Hilamr,
>>
>>Thanks for ur solution,
>>generate the serial nos. that's the only way.
>>But, still i m in confusion that why select statment is not retriving in order.
>>
>>With thanks and regards
>>Abdulla
>
>Quite simply, Visual FoxPro doesn't guarantee any particular order, if you omit an ORDER BY statement; or if you include ORDER BY for one or more fields, but several records have the same values for these fields.
>
>However, I have seen that when selecting data from a single table, the order (as in recno()) is usually respected - but I wouldn't take it for granted; there really is no guarantee that it will always work.
>
>When combining data from the first table with a second table, Visual FoxPro might decide that it is more efficient to sort data according to the order in the first table, or in the second.
If it's not broken, fix it until it is.
My Blog