Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Sorting column on alpha-numeric data
Message
De
03/09/2013 03:34:57
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows Server 2012
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Web
Divers
Thread ID:
01581848
Message ID:
01581865
Vues:
108
This message has been marked as the solution to the initial question of the thread.
Padl(Trim(field), 99)

>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
Thierry Nivelet
FoxinCloud
Give your VFP application a second life, web-based, in YOUR cloud
http://foxincloud.com/
Never explain, never complain (Queen Elizabeth II)
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform