Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Capitals
Message
From
02/08/2003 16:56:27
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Miscellaneous
Thread ID:
00816234
Message ID:
00816235
Views:
16
>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)
Previous
Reply
Map
View

Click here to load this message in the networking platform