Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Parameterized Views and 'Like'
Message
 
À
14/08/1997 12:08:11
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00044656
Message ID:
00044662
Vues:
32
>>I am creating a parameterized view. One of the parameters in this view is 'dbfname LIKE ?vp_dbfname. I thought this would allow me to have something similar to the 'contained in' operator ($). So, for example, if vp_dbfname = "A" then all dbfname's with 'A' in them would be pulled. The problem I am having is that no data is being pulled. The If I just use = instead of LIKE it works fine. I'm probably missing something.
>
>The idea of 'LIKE'is to use wildcards (percent sign and underscore). E.g. if you want to retrieve all records started with "A", then vp_dbfname="A%". For records containing "A", you use construction vp_dbfname="%A%", etc.

Thanks Edward. I was just looking at this and realized that same fact. Unlike the contained in operator ($), like explicitly requires the wildchard operators. So, to make LIKE match $ in function, you would use somethign like %A%. This would return all records which contained an A. In addition, like recognizes the single character substitution using _. So, vp_dbfname = '_ZIP' would return all records that are 4 characters wide and end with 'ZIP'.

Thanks again!

Michael G. Emmons
memmons@nc.rr.com
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform