On Sun, Nov 16, 2008 at 01:19:27PM -0500, Ben Marchbanks scratched on the wall:
> Abridged sample of the insert statement that produces an error when
> trying to insert escaped text.....
>
>
> INSERT INTO pageWords (word) VALUES (" \"nitch\" ");
It is throwing an error because this is not valid SQL.
In SQL, string literals use single quotes, so you want:
INSERT INTO pageWords (word) VALUES (' "nitch" ');
If you're not familiar with SQL syntax, you might want to read this:
http://www.sqlite.org/lang_expr.html
In specific, on string literals:
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.
-j
--
Jay A. Kreibich < J A Y @ K R E I B I.C H >
"Our opponent is an alien starship packed with atomic bombs. We have
a protractor." "I'll go home and see if I can scrounge up a ruler
and a piece of string." --from Anathem by Neal Stephenson
_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users