Re: [sqlite] Problem with .import

2007-02-10 Thread Rich Shepard
On Sat, 10 Feb 2007, Kees Nuyt wrote: This is not a comma delimited values file like .import could process, but an SQL script. You can execute it like: sqlite3 databasefilename .read variable.sql Kees, Thank you. I knew it was somthing simple. Rich -- Richard B. Shepard, Ph.D.

Re: [sqlite] Problem with .import

2007-02-10 Thread Kees Nuyt
On Sat, 10 Feb 2007 12:09:12 -0800 (PST), you wrote: >On Thu, 28 Sep 2006, Dennis Cote wrote: > >> I suspect you may have trailing spaces at the ends of your lines. The >> .import command isn't very smart about things like that. Your separator is >> set to one space, not arbitrary whitespace. It t

Re: [sqlite] Problem with .import

2007-02-10 Thread Rich Shepard
On Thu, 28 Sep 2006, Dennis Cote wrote: I suspect you may have trailing spaces at the ends of your lines. The .import command isn't very smart about things like that. Your separator is set to one space, not arbitrary whitespace. It there is another separator after the last field it assumes there

Re: [sqlite] Problem with .import -- SOLVED

2006-09-29 Thread Rich Shepard
On Fri, 29 Sep 2006, Dennis Cote wrote: When all else fails, the source is the ultimate documentation. :-) Dennis, True. True. Thanks, Rich -- Richard B. Shepard, Ph.D. |The Environmental Permitting Applied Ecosystem Services, Inc.(TM)|Accelerator

Re: [sqlite] Problem with .import -- SOLVED

2006-09-29 Thread Dennis Cote
Rich Shepard wrote: I tried to find documentation on the .import command (and the other metacommands), but couldn't. Nothing about them in Mike Owens' book, the man page, or a Google search. This must be one of the pieces of knowlege that's passed from generation to generation only when som

RE: [sqlite] Problem with .import

2006-09-28 Thread Rich Shepard
On Thu, 28 Sep 2006, Griggs, Donald wrote: Depending on your needs, if it's awkward to trim away the final delimiter, you might choose to simply add a dummy field to your table. Donald, No, it's easy enough in joe to replace a space followed by the end-of-line ($) with just the end-of-line.

RE: [sqlite] Problem with .import

2006-09-28 Thread Griggs, Donald
Regarding Rich Shepard's problem: "...tells me that 31 columns are expected, but it found 32." And tagging onto Dennis Cote's explanation: "...I suspect you may have trailing spaces at the ends of your lines." I agree with Dennis. Apparently there are different interpretations for delim

Re: [sqlite] Problem with .import -- SOLVED

2006-09-28 Thread Rich Shepard
On Thu, 28 Sep 2006, Dennis Cote wrote: I suspect you may have trailing spaces at the ends of your lines. The .import command isn't very smart about things like that. Your separator is set to one space, not arbitrary whitespace. It there is another separator after the last field it assumes there

Re: [sqlite] Problem with .import

2006-09-28 Thread Dennis Cote
Rich Shepard wrote: When I try to import a data file into an existing table, sqlite's shell tells me that 31 columns are expected, but it found 32. Now I no longer have the visual acuity I did when I was a teenager, but no matter how many times I count the fields, they total 31. Therefore, I

[sqlite] Problem with .import

2006-09-28 Thread Rich Shepard
When I try to import a data file into an existing table, sqlite's shell tells me that 31 columns are expected, but it found 32. Now I no longer have the visual acuity I did when I was a teenager, but no matter how many times I count the fields, they total 31. Therefore, I don't know why I'm gett

Re: [sqlite] Problem with import

2006-01-19 Thread Chris Schirlinger
I created your schema and saved the single line you provided to a file and it all imported fine: sqlite> .nullvalue NULL sqlite> .separator ; sqlite> .import text.txt Cliente sqlite> select * from cliente; 1|2005-02-13 00:00:00|FRANCISCO EDNAN SABOIA PONTES |0|R|NEWTON PARENTE|1161|PRO XIMO AO COM

Re: [sqlite] Problem with import

2006-01-19 Thread Dennis Cote
Daniel de Matos Alves wrote: PLEASE, read my e-mail, i really need help ;-) I am trying to import data from a file using sqlite3 command line, and the tcl bind. But I aways get error about the Number of Columns. Sqlite always says that I am trying to put less columns than the number of co

[sqlite] Problem with import

2006-01-19 Thread Daniel de Matos Alves
PLEASE, read my e-mail, i really need help ;-) I am trying to import data from a file using sqlite3 command line, and the tcl bind. But I aways get error about the Number of Columns. Sqlite always says that I am trying to put less columns than the number of columns defined in the table.