Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Optimizing query on table using GENERAL index
Message
De
20/02/2008 17:55:44
Mike Yearwood
Toronto, Ontario, Canada
 
 
À
20/02/2008 14:15:28
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Divers
Thread ID:
01294254
Message ID:
01294519
Vues:
21
>Hi Mike,
>
>Are you insinuating that I did not read the help file? :-) I did, under SET COLLATE but did not see anything. It actually dawned on me 1/2 an hour after posting this to try that (isn't that usually the case - as an old guy used to say "thoughts disentangle themselves when they flow over the lips or through the finger tips".

True enough. I had that happen last night. I was going to ask a question here and came up with my own answer which I'm having a good time implementing.

>
>Regarding the UPPER() on the vars, I would have thought that this only fired once at the start of the command firing - not on every row. Just trying to avoid a couple extra lines.

I'm quite certain that someone did an FPA tip on that one. It does take slightly longer. I figure doing it with the couple of extra lines every time is easier on me, results in consistent code overall and scales up with the number of records in the table well.

>
>As you can probably tell, this discussion was also picked up over on Foxite. I had hoped that Steve Black might jump in as he used to be at least the guru on accented characters etc. I used his INTL app years ago to INTLize a hockey app. Everything seemed to work there - maybe I had better go over and open up that 2.6 code...
>
>Albert
>
>>You will have to SET COLLATE TO GENERAL before doing the SELECT. Says so right in the help. :)
>>
>>While you're doing that you might also upper your memory variable once in advance of the query rather than per row.
>>
>>SET COLLATE TO GENERAL
>>lcLastName = UPPER(m.lcLastName)
>>lcFirstName = UPPER(m.lcFirstName)
>>
>>SELECT Lastname, Firstname ;
>> FROM Lawyers ;
>> WHERE UPPER(lastname) == m.lcLastname AND ;
>> UPPER(Firstname) == m.lcFirstname ;
>> INTO ARRAY laNames
>>
>>HTH
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform