On Nov 17, 2008, at 1:25 AM, P Kishor wrote: > On 11/16/08, Ben Marchbanks <[EMAIL PROTECTED]> wrote: >> Abridged sample of the insert statement that produces an error when >> trying to insert escaped text..... >> >> >> INSERT INTO pageWords (word) VALUES (" \"nitch\" "); > > SQL text strings are delimited by single quotes. If your really want > to insert "nitch" (including the double quotes), try ... VALUES > ('"nitch"'); > > Alternatively, check out the ESCAPE clause in SQLite docs.
The ESCAPE clause is part of the syntax for LIKE expressions. Despite what it intuitively sounds like it should do, it cannot be used to escape characters in string literals. The passage that describes how to form string literals is hidden in this page: http://www.sqlite.org/lang_expr.html It reads: "A string constant is formed by enclosing the string in single quotes ('). A single quote within the string can be encoded by putting two single quotes in a row - as in Pascal. C-style escapes using the backslash character are not supported because they are not standard SQL." Dan. _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users