Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Wildcard Views and SQL statements
Message
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00443270
Message ID:
00443282
Views:
20
>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.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform