How to escape % character in LIKE clause 
Author Message
 How to escape % character in LIKE clause

Quote:
>Can some one tell me how to search for a field value which contains %; I mean
>how to escape % in LIKE clause TIA

    hi
Just place backslash before %(WHERE fld like '\%')

Regards
-------------------------
Konstantin V. Sartakov
Kuzbassprombank, Kemerovo, Russia



Wed, 20 Jun 2001 03:00:00 GMT
 How to escape % character in LIKE clause

In the where clause you also have to explicitly specify '\' as the escape
character.  The exact syntax is:

...WHERE field like '\%' ESCAPE '\'

Eric Ma

Quote:


...
>>Can some one tell me how to search for a field value which contains %; I
mean
>>how to escape % in LIKE clause TIA

>    hi
>Just place backslash before %(WHERE fld like '\%')

>Regards
>-------------------------
>Konstantin V. Sartakov
>Kuzbassprombank, Kemerovo, Russia




Wed, 20 Jun 2001 03:00:00 GMT
 
 [ 4 post ] 

 Relevant Pages 

1. Weirdness with escaped characters in WHERE clauses....

2. Weirdness with escaped characters in WHERE clauses....

3. How to escape HTML tags in ORDER BY clause

4. turn off SQL Server escape clause

5. JDBC escape clause - function CONVERT

6. Help: LIKE statement escape clause with OLEDB Jet 4 Provider

7. Escape clause?

8. Configure Date format and ODBC escape clauses

9. Using ODBC escape clauses with ADO/OLEDB

10. Escaping characters

11. is there an escape character for SQL statements?

12. Ignoring/escaping special characters in SQL


 
Powered by phpBB® Forum Software