Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Wildcard Views and SQL statements
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00443270
Message ID:
00443282
Vues:
12
>I know that there is a simple way to handle this type of pull. I want to be able to select three fields out of this customer table that i am accessing through SQL Pass Through. What I am trying to do is grab all the records that have a name like '*smith*' or some kind of wildcard feature. I know if I use a '?lcname' it will pop an input box but it needs the exact value or else it will not find it.
>I know that this has to be something very simple or it just can't be done.
>
>Thanks in advance
>LeRoy


The wildcard for multiple characters is "%" (percent), for single its "_" (underscore)

Use LIKE in the select statement e.g.,
lcvalue = "%smith%"
select * from mytable where lower(clast_name) like ?lcvalue


This works for any VFP, SQL Server, and Oracle.
Insanity: Doing the same thing over and over and expecting different results.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform