Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Question on General indexes and searching
Message
De
20/02/2014 12:06:53
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Question on General indexes and searching
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows Server 2012
Network:
Windows 2008 Server
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01594803
Message ID:
01594803
Vues:
62
Hi all,

Been a long time since I dug into "General" indexes so want to check something out before I tinker with a customer's setup:

- I changed their lastname/firstname indexes a few years ago to "General" from "machine" so that they would sort correctly with accented characters
- I therefore also dropped wrapping the index expression in UPPER() since general indexes are case-insensitive (or that's what I thought)

e.g. old INDEX ON UPPER(Lastname) TAG Lastname
became INDEX ON Lastname TAG Lastname

- I therefore changed some of their other queries to drop using UPPER(); just a few days ago a user called to say that they did not get a match when searching a client file. I double-checked and it worked for me - until I realized that it had failed because of a difference in case ("DeJong" instead of "Dejong"). I thought my queries were case insensitive because the query matched an index

e.g. SELECT...WHERE Lastname = "DeJong" matches index "INDEX ON Lastname"

So if I change the query back to:

WHERE UPPER(Lastname) = "DEJONG"

then to get query optimization, I should be changing the tag back to UPPER(Lastname)

Two questions:

1) am I correct in assumptions and should I proceed with changing back the tags to include UPPER()
2) how will inserting UPPER() into a tag that is GENERAL affect sort order (it doesn't seem to but I need to be sure).

Thanks,

Albert Gostick
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform