Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SET FILTER Question?
Message
De
05/04/2007 10:07:12
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
 
 
À
05/04/2007 10:00:34
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows 2000 SP4
Network:
Windows 2000 Server
Database:
Visual FoxPro
Divers
Thread ID:
01212448
Message ID:
01212456
Vues:
15
>What does this mean? Please help. Thanks, Sam
>
>
>SET FILTER TO crsSupply.Status $ '123'
>
I assume Status is a character field, of a single byte. In this case, Status $ "123" is logically equivalent to Status = "1" or Status = "2" or Status = "3" (or the equivalent with inlist()).

The $ operator simply says, string 1 is contained within string 2. I often use a shortcut like the one you indicate. But note that it is not Rushmore-optimizable, so the inlist() version may be better in some cases.

I do find the inclusion of the alias (crsSupply) doubtful. If it is the current alias, then it can simply be omitted. If it is not the current alias, then, depending on the condition, either all or none of the records will be selected.
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
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform