On Mon, Mar 22, 2010 at 11:59 PM, Ted Rolle wrote:
> Here's the table definition:
> 1 CREATE TABLE jokes (
> 2 source TEXT,
> 3 language TEXT,
> 4 question TEXT,
> 5 answer TEXT
> 6 );
> This works.
> This doesn't:
> INSERT INTO jokes
> VALUES ("Radio Eriwan","de_DE","Frage an Radio Eriwan: An welchem Tag genau
> starb Josef Stalin?","Man weiss es nicht, aber es war ein Feiertag.“)
> Here's the error message:
> Last Error: unrecognized token: ""Man weiss es nicht, aber es war ein
> Feiertag.“)"
Works just fine for me; see below. Next time try using single quotes
to delimit the text strings (I have no idea why folks use
double-quotes to do so... obviously they are getting into this habit
from some other software usage). SQL uses single quotes to delimit
strings, and doubles quotes are used for defining entities (table
names, column names, etc.) that would otherwise clash with keywords or
other SQL rules.
punk...@lucknow ~/Data/punkish$sqlite3
-- Loading resources from /Users/punkish/.sqliterc
SQLite version 3.6.19
Enter ".help" for instructions
Enter SQL statements terminated with a ";"
sqlite> CREATE TABLE jokes (source TEXT, language TEXT, question TEXT,
answer TEXT);
sqlite> INSERT INTO jokes VALUES ('Radio Eriwan','de_DE','Frage an
Radio Eriwan: An welchem Tag genaustarb Josef Stalin?','Man weiss es
nicht, aber es war ein Feiertag.');
sqlite> SELECT * FROM jokes;
sourcelanguagequestion
answer
--
---
-
Radio Eriwan de_DE Frage an Radio Eriwan: An welchem Tag
genaustarb Josef Stalin? Man weiss es nicht, aber es war ein
Feiertag.
sqlite>
--
Puneet Kishor
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users