Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Wild card in where clause
Message
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00246921
Message ID:
00246938
Views:
15
>Can you use a wildcard in the where clause of a select statement?
>
>
>if thisform.cToShow = "All"
> lcCatToShow = "" &&>>> This is where I want a wildcard

You can use wildcarding in at least two ways.
Standard DOS-style wildcarding (? matches any single character, * any number of characters) using the LIKE() function in your WHERE clause rather than equivalence; IOW, rather than CatLink.Catagory == lcCatToShow , you'd say LIKE(lcCatToShow,CatLink.Catergory,) .

Alternatively, you can use the SQL LIKE Clause (% == *, _ == ?), so that instead of CatLink.Catagory == lcCatToShow you'd say CatLink.Category LIKE lcCatToShow.
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform