> Xuanvinh Vu <[EMAIL PROTECTED]> wrote:
>> Sorry it was actually quite simple for the WHERE clause it should be
>>
>> WHERE Name LIKE '2_%'
>>
>> to select Name that starts with the string "2_"
> 
> Note that '_' is one of the special characters LIKE operator recognizes: 
> it matches any character (the other one, %, matches any sequence of 
> characters). Thus, the condition you show is actually looking for 
> strings that begin with '2' and are at least two characters long.
> 
> You want something like this:
> 
> WHERE Name LIKE '2\_%' ESCAPE '\'
> 
> Igor Tandetnik 

Looks like Igor's and my replies crossed in the (e)mail!

One question:  I thought that the '\' character is not part of the
SQL standard.  (That's why I specified '/' instead as my ESCAPE
character).

- Richard Klein
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to