hi

I am quite new to sqlite, so, please forgive me if there is anything
obviously incorrect.

I created a table with the following fields:

>>create table final(idx varchar(10), enc varchar(8), data varchar(4096));

and I want to import the following xml-type of data to this table:

<idx>rec1<idx>
<enc>001<enc>
<data>
line 1
line 2
line 3
<data>

I noticed that load_file() function does not work in sqlite, but sqlite has
.import command. So, I reformatted the xml into the following

rec1|001|line1
line2
line3

and import it using the following command

>>.separator "|"
>>.import recdata.txt final

sqlite complained about "recdata.txt line 2: expected 3 columns of data
but found 1"

my question is: is there a way I can import fields with multiple lines
to sqlite? is importing xml supported in sqlite (I did not see it from
the documentation)?

thank you

Qianqian

_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to