Re: [sqlite] .import on a .csv file

2009-10-22 Thread Rich Shepard
On Thu, 22 Oct 2009, Simon Davies wrote: > One solution is to replace your existing separators (,) with a character > that does not exist in your data, specify that character as the separator > to sqlite, and you should be good to go .import. I found the solution was to change all field separ

Re: [sqlite] .import on a .csv file

2009-10-22 Thread Simon Davies
2009/10/22 Scott Baker : > I'm trying to .import a CSV file and I can't quite figure out the syntax. > > I created a table, and then did: > > .separator , > .import /tmp/foo.csv mytable > > This works sort of, unless my data has , in it. Something like "last, > first". Because it tries to split at

Re: [sqlite] .import on a .csv file

2009-10-22 Thread Adam DeVita
Do you have any new lines, returns, or tabs in any of the real data? Can you prove it? Is this a 1 off thing or are you going to do this routinely? There has been a lot of discussion on this list about importing csv data and the hardships of writing a good csv importer. If this is a one off, so

[sqlite] .import on a .csv file

2009-10-22 Thread Scott Baker
I'm trying to .import a CSV file and I can't quite figure out the syntax. I created a table, and then did: .separator , .import /tmp/foo.csv mytable This works sort of, unless my data has , in it. Something like "last, first". Because it tries to split at that , and then the number of rows doe