Information générale
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Hiya Simon...
Try: st_name+PADL(ALLTRIM(STR(st_num)), 10, "0")+PADL(ALLTRIM(STR(st_num)), 10, "0")
So you get "MAIN00000000100000000001" as a sorting string.... I chose 10 digits arbitrary... those
"0" in the PADL() are zeros...
HTH
Ric
>
>I have a address table 1 field for the street name and another field for the street number and another for the suite number all ar character type , I want to sort the table by streets so i did the index on st_name+st_num+suite but than it sorts like that
>
>1
>11
>112
>2
>
>Can someone please help me how to sort it in the proper way with the numeric order.
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement