On 25 Oct 2013, at 8:11pm, Joe.Fisher <joe.fis...@tanguaylab.com> wrote:

> Is it possible to import data by column number without using any delimiters?
> 
> We have massive text based data files where each record of the data is 
> segmented and consistent (Col 1-3, 4-9, 10-12, etc.).
> 
> I've never had experience importing without some delimite

There's nothing in the shell tool that will do it in one process.  You can, of 
course, write your own code to read the text file and generate the appropriate 
INSERT command.

But you could also do it entirely in the shell tool:

Use the SQLite shell tool to import each row into one column of a table as one 
long string, then use an UPDATE command to split the various character ranges 
of that column into parts.  And you can save space in the file by setting the 
original long column to NULL.

UPDATE myTable SET col1=substr(importcol,1,3), col=substr(importcol,4,7, ...

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

Reply via email to