Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Wildcards in Parameterized View
Message
De
23/04/1999 13:43:12
 
 
À
23/04/1999 13:23:02
Mark Ganchrow
Dataware Technology Group, Ltd.
Rochester, New York, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00211604
Message ID:
00211618
Vues:
23
>I'm using the view designer, and trying to create (modify, actually) a parameterized view that will allow the user to enter any part of a name for searching.
>What I've tried is SELECT...WHERE...ACCTNAME LIKE UPPER( %?lcAcctName% ).
>
>I've tried it without the UPPER (the names are stored in all uppercase anyway), and with the question mark to the left of the first percent sign, but in no case does it prompt me for the value, and it always returns no records. The variable is not defined; when I remove the percent signs, it prompt me to enter the value.
>
>I haven't used the LIKE operator much, nor the % and _ wildcards, so this is a new area for me.
>

Try WHERE ?lcAcctName $ UPPER(AcctName)

if you want check if the content of lcAcctName appears anywhere in ACCTNAME.

Example: lcAcctName='SMITH'

matches John Smith, Smithsonian Institute, Smithers, arglebarglesmithwhoosh

WHERE LIKE(?lcAcctName, UPPER(AcctName))

where lcAcctName contains a template using the * (0..n characters) and ? (exactly one character) wildcards.

lcAcctName = 'SMITH*' matches anything starting with SMITH,
lcAcctName = '*SMITH' matches anything ending in SMITH,
lcAcctname = '*SMITH*' matches anything containing SMITH
lcAcctname = 'SM*TH' matches SMITH, SMYTH, SMOOTH, SMTH
lcAcctName = 'SM?TH' matches SMITH, SMYTH but not SMOOTH or SMTH

>Thanks for any help.
>Mark
>Mganchrow@networks-inc.net
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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform