Re: [sqlite] can ignore n lines when .import data file?

2006-01-06 Thread ronggui wong
2006/1/7, Griggs, Donald <[EMAIL PROTECTED]>: > > Regarding: > > I want to use .import ... but the first line is the variable(fields), so I > want to ignore it. > = > > Possible option #1: > > If it wouldn't violate any database-enforced constraints, why not import

Re: [sqlite] can ignore n lines when .import data file?

2006-01-06 Thread Nemanja Corlija
On 1/6/06, ronggui wong <[EMAIL PROTECTED]> wrote: > As I see,many CSV files using \t as separator. > And SQLite does not use \t,I have to use sed(or other tools) to change > Tab to |. so My puzzle is why SQLite not support \t? You can set separator to be anything you want, including \t. Use this

Re: [sqlite] can ignore n lines when .import data file?

2006-01-06 Thread Jay Sprenkle
> > Have you tried "head" or "tail"? > do you means the head command of the OS,say linux ? > Not yet,using "head" or "tail" will be faster than sed? My guess would be yes, though probably not much. It should be pretty simple to test. If it's a very large file you may be limited by your I/O speed,

Re: [sqlite] can ignore n lines when .import data file?

2006-01-06 Thread ronggui wong
2006/1/7, Jay Sprenkle <[EMAIL PROTECTED]>: > Have you tried "head" or "tail"? do you means the head command of the OS,say linux ? Not yet,using "head" or "tail" will be faster than sed? As I see,many CSV files using \t as separator. And SQLite does not use \t,I have to use sed(or other tools) to

Re: [sqlite] can ignore n lines when .import data file?

2006-01-06 Thread ronggui wong
2006/1/7, Griggs, Donald <[EMAIL PROTECTED]>: > > Regarding: > > I want to use .import ... but the first line is the variable(fields), so I > want to ignore it. > = > > Possible option #1: > > If it wouldn't violate any database-enforced constraints, why not import

Re: [sqlite] can ignore n lines when .import data file?

2006-01-06 Thread Jay Sprenkle
Have you tried "head" or "tail"? On 1/6/06, ronggui wong <[EMAIL PROTECTED]> wrote: > I want to use .import to import a data file into SQLite.but the first > line is the variable(fields),so I want to ignore it.delete the first > row of the data is one solution,But the data file is large ,and try

RE: [sqlite] can ignore n lines when .import data file?

2006-01-06 Thread Griggs, Donald
Regarding: I want to use .import ... but the first line is the variable(fields), so I want to ignore it. = Possible option #1: If it wouldn't violate any database-enforced constraints, why not import the entire file, then delete the first row via SQL? DELETE

[sqlite] can ignore n lines when .import data file?

2006-01-06 Thread ronggui wong
I want to use .import to import a data file into SQLite.but the first line is the variable(fields),so I want to ignore it.delete the first row of the data is one solution,But the data file is large ,and try to use sed to delete the first row,it takes long time a|b|c 1|2|3 |3|1 ...