Try creating a script file something like(Psuedo code):
.separator ","
CREATE TEMP TABLE dummy (value);
.import file1.csv dummy
INSERT INTO TEST (filename,number) (SELECT 'file1.csv', value FROM dummy;
delete from dummy;
.import file2.csv dummy
INSERT INTO TEST (filename,number) (SELECT 'file2.csv'
Hi,
Suppose that I have a number of files, each file has some numbers in
it (by line). I want to load the content of each file and the
associated filename into the following table.
create table test (id integer primary key, filename text, number integer);
For example, if file 'a' has number 1,2
2 matches
Mail list logo