NewsGroup gmane.comp.db.sqlite.general
Subject .. Loading Data
Date . 2011-07-28
Post_By .. Daniel Spain
Edit_By .. Stanley C. Kitching
I added some white space and new-line characters
to Daniel's original post using a first pass
through Python and a secon
hey all. i got my engine to compile so now im doing basic SQL syntax of load
the user, since its in a very early production stage the players table only has
4 values to load. Table: Players UserID varchar(30) /* their constant
userid */ Race smallint /* their race
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
4 matches
Mail list logo