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:
00246947
Views:
18
Thanks for the info. The SQL like works fine.
Are there any reasons to choose one over the other?

Also what would work for a logical field? I have a form property with a nValue of 0, 1 or 2 and I want to select on obsolete = .t., .f. or either.

>>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.
Roi
'MCP' Visual FoxPro

In Rome, there was a poem.
About a dog, who found two bone.
He lick the one, he lick the other.
He went pyscho, he drop dead!
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform