Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Partial Search
Message
De
29/09/1997 15:23:10
Dragan Nedeljkovich
Now officially retired
Zrenjanin, Serbia
 
 
À
24/09/1997 09:50:29
Jerry Tovar
Dana Corporation Dana It
Maumee, Ohio, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Divers
Thread ID:
00051319
Message ID:
00052250
Vues:
46
>>... where FieldName like '%&MyVar.%' >> >>This will return rows where your variable text string is anywhere in the >field, not just at the beginning of the field. > >Mark, > >Excuse me for butting in but, will "where FieldName like '%&MyVar.%'" run >faster than >"where ATC(myvar, mytable.myfield) > 0"? I am also trying to find a fast >way of searching >for strings inside of a character field. > >Thanks >Jerry Tovar The LIKE clause is pure SQL, while ATC is internal Fox function which is probably not optimizable. Besides, I think that using '%&MyVar.%' is not the quickest way to do it - I'd rather build the string MySearchVar_lc='%'+MyVar+'%' and then have "where FieldName like MySearchVar_lc" instead - why use macro substitution where it's not necessary at all.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform