Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SET FILTER Question?
Message
From
05/04/2007 10:07:12
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
 
To
05/04/2007 10:00:34
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows 2000 SP4
Network:
Windows 2000 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01212448
Message ID:
01212456
Views:
16
>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)
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform