A.J.Millan <[EMAIL PROTECTED]> wrote:
I need a simple search, say:
SELECT someField IN someTable WHERE name LIKE '%xyzetc%';
After some search in this list, I'm a bit more confused that before.
For
example after reading literally:
The escape mechanism for LIKE has never been implemented in
SQLite.
I don't know where you are reading this. In any case, this information
is obsolete. ESCAPE clause works since SQLite 3.1.0
Can someone unveil me the correct syntax for that query?
For what query? You only need ESCAPE if you want to look for strings
that themselves contain % or _ characters. Do you? What exactly are you
trying to achieve?
For example, this query retrieves all rows where someField contains '%'
character:
SELECT * FROM someTable WHERE someField LIKE '%\%%' ESCAPE '\';
Can I use some like:
SELECT someField IN someTable WHERE name LIKE '<?>xyzetc<?>' ESCAPE
<?>;
No. ESCAPE should be followed by a string consisting of exactly one
character.
Igor Tandetnik
-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------