Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Capitals
Message
De
02/08/2003 16:56:27
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Divers
Thread ID:
00816234
Message ID:
00816235
Vues:
17
>How to display in a grid the correct alphabetical order
>regardless of the names to be capital fonts or not ?

Let's assume you want to sort by a column that contains names.

I know two quite different methods.

1) Use an index that has the expression upper(name). This index will sort uppercase and lowercase (mayúsculas y minúsculas) correctly. Letters with diacriticals (acentos) will still be sorted at the end, though.

2) SET COLLATE TO GENERAL, and then create the index. UPPER() is not necessary in this case. This index will sort upper- and lowercase correctly, and also accented characters. However, the index will take up twice the normal space.

Be careful - you should not use SET COLLATE TO GENERAL in all your indices. For instance, an index on an integer PK or FK, created with bintoc(), will cause some strange results.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform