lundi 3 août 2015

Why is there "no such column" in sqlite when `pragma` shows it?

I have a table in sqlite, and I can show the columns like so in the sqlite command line:

pragma table_info(new_table);

and it prints the following:

|0|col1,col2,col3,col4|TEXT|0||0

then I try to print the column like so:

select new_table.col1 from new_table;
Error:no such column:  new_table.col1

I tried adding quotes around each column in the csv, but to no avail:

"col1","col2","col3","col4"
3,4,2,5
5,2,3,6

when I try to import this csv ( .import something.csv new_table), I get an error:

unescaped " character

What is the way to resolve this issue?

Thank you.

Aucun commentaire:

Enregistrer un commentaire