Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Substring search with Parm View?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00170654
Message ID:
00170841
Vues:
36
>I am trying to build a Parameterized View, but I want to do a substring search with 3 parameters.
>
>If cUsrFirstChoice = 'Toolkit', then this works:
>
> where ?cUsrFirstChoice $ cTitle
>
>But if cUsrFirstChoice = 'Toolkit' and cUsrSecondChoice = ''
>then this returns no records:
>
> where ?cUsrFirstChoice $ cTitle
> and ?cUsrSecondChoice $ Subtitle
>
>I was dinkering with macro expansion and the '%' but am coming up dry. Help?!

cUsrFirstChoice = "%" + lcYourVariable1 + "%"
cUsrSecondChoice = "%" + lcYourVariable2 + "%"

... where cTile like ?cUsrFirstChoice and SubTitle like ?cUsrSecondChoice

Of course you do not have to precede the variable with a percent sign if your search is to start at the beginning of the field.
Mark McCasland
Midlothian, TX USA
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform