Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Wild card in where clause
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00246921
Message ID:
00246947
Vues:
22
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!
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform