>>Hello,
>>
>>I was trying to fix a sorting issue on a alpha-numeric field. We have an Employee number field, and most companies use numbers for this, but some may also allow characters to be entered as Employee number. So we made it a character field, with the result that when sorting in the search result it would look awkward for those that have only numbers:
>>1
>>10
>>11
>>2
>>3
>>etc.
>>
>>Only option I can think of is to have a setting in the program that would allow only for numeric data in this field, and then sort it on VAL(). Maybe someone has a another idea? Like if they want to prefix with a character code "A" or "B" etc, and the sorting would still work properly? But I doubt this can be done without specifying the format in the user preference.
>>A1
>>A2
>>A3
>>A10
>>etc
>
>Take a look at
http://social.msdn.microsoft.com/Forums/sqlserver/en-US/03020fa1-07c0-4ec6-87ee-79411f0df081/sorting-alphanumeric-dataThanks, that would work, but in my case I need to set the index in the VFP cursor to change the order without requery from the database.
Christian Isberner
Software Consultant