Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Select Where...using the ESCAPE operator for wildcards?
Message
From
01/09/1998 09:30:12
 
 
To
31/08/1998 21:28:57
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00131693
Message ID:
00131868
Views:
21
>>SQL select help says "The Where clause supports the ESCAPE operator for the JoinCondition, allowing you to perform meaningful queries on data containing the SELECT - SQL % and _ wildcard characters."
>>
>>Has anyone used this or got it to work, and if so, can you provide proper syntax? Since help doesn't mention what the 'Escape operator' is, I tried the literal WHERE ESCAPE '%' but I failed to perform any 'meaningful queries';)
>
>From the SELECT - SQL help:
>
>Example 9
>
>Example 9 displays FilterCondition in the form of FieldName [NOT] LIKE cExpression
>
>customer.country NOT LIKE "UK"
>>/pr>
>This filter condition searches for each field that matches cExpression.
>
>You can use the percent sign (%) and underscore ( _ ) wildcards as part of cExpression. The percent sign represents any sequence of unknown characters in the string. An underscore represents a single unknown character in the string.

It was the mention of 'Escape operator' in the help which didn't make any sense (I still don't understand what that means).

I was actually looking for a way to construct a WHERE clause which allowed me to specify a wildcard in such a way that I could allow a user to specify a specific condition or if they didn't, still get all the records. The following solution worked:

test = "%"
SELE
WHERE Cfevents.ev_eventdesc LIKE ?test
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform