On Wed, 6 Apr 2011 00:08:47 +0300, Gert Van Assche <ger...@datamundi.be> wrote:
>Dear all, > >what would be the best way to read a full txt file into one record? >Now, when I use > .import FILE TABLE >I have every line on a record. > >I need all lines of one file on one record. >The next record I need to fill with all lines of another file. Here's a oneliner (line wrapped by mail) that stores a series of text files in BLOBs, one file per row. It works for binary files as well. d=test.db3 ; echo "CREATE TABLE Files (name TEXT PRIMARY KEY,contents BLOB);" | sqlite3 $d ; for f in yourfiles* ; do echo "INSERT INTO Files (name,contents) VALUES ('$f',X'$(od -v -A n -t x1 $f|tr -d '\r\n\t ')');" | sqlite3 $d ; done It might not be what you're looking for. -- ( Kees Nuyt ) c[_] _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users