Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Partial Search
Message
From
24/09/1997 10:35:13
 
 
To
24/09/1997 00:09:57
Larry Long
ProgRes (Programming Resources)
Georgia, United States
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
00051319
Message ID:
00051402
Views:
33
Larry,

Thanks, I found that by using the % wild card on either side of the search and using LIKE works. I currently using: (cSearch is the variable filled with the search request - basically cSearch = "%" + Alltrim(input) +"%")

SELECT customer.cust_id, customer.username, customer.firstname,;
customer.lastname, customer.orgname;
FROM customer;
WHERE customer.username LIKE ?cSearch;
OR (customer.lastname LIKE ?cSearch);
OR (customer.orgname LIKE ?cSearch);
ORDER BY customer.username, customer.lastname,;
customer.firstname


>>I am trying to create a view to take a variable that is filled with a search string and query that against a SQL table that will partially match the SQL table field. I can find the records of the search string matches the whole table field but if only a part of the search string is found in the record it returns nothing...Can anyone help here? Thanks again!
>>
>>Gary
>If I understand correctly your problem may be one or both of the following
>1) Try SET EXACT OFF
>2) In your SELECT statement make sure that you have field=trim(variable)
>The point being ensuring that variable is on the right side ot the "="
>
>Hope this helps (HTH) //:^)
Previous
Reply
Map
View

Click here to load this message in the networking platform