RE: [sqlite] Importing a CSV file

2005-02-26 Thread Brass Tilde
> > That should have been obvious if you'd attempted to select 
> > something from the table with headers turned on in the command 
> > line utility.
> 
> Thank you so much, and sorry for sending this stupid 
> question. 

No apologies necessary, except for me.  Re-reading that passage, it looks
much harsher than I meant it.  Sorry about that.  I merely meant it as a
suggestion for *next* time something like that happens.

> Sometimes things ar just too obvious to be seen (in 
> french, we say they are "on one's nose"). 

In English, "right in front of one's nose". :)

> In fact, as the table was empty, I did not know how to start the 
> troubleshooting. I tried to dump the table, but sqlite keeps 
> the exact formatting of the sql instruction :

In the command line utility, the ".header" option controls the display of
the column names when you do a select.  I didn't notice your problem right
off either, so I just created the table and selected from it to see the
extra column.




Re: [sqlite] Importing a CSV file

2005-02-25 Thread Charles Plessy
On Fri, Feb 25, 2005 at 07:59:01AM -0500, Brass Tilde wrote :
> > CREATE TABLE All_Chr_CxCb_atleast1 (
> > LOCUSLINK   TEXT,
> > GO, BLOB,
> > CAA INTEGER,
> 
> 
> You've got an extra comma here after the "GO" field.  That makes the parser
> think your trying to create field named GO, followed by one named BLOB, then
> one named CAA.  Remove the comma.
> 
> That should have been obvious if you'd attempted to select something from
> the table with headers turned on in the command line utility.

Thank you so much, and sorry for sending this stupid
question. Sometimes things ar just too obvious to be seen (in french,
we say they are "on one's nose"). In fact, as the table was empty, I
did not know how to start the troubleshooting. I tried to dump the
table, but sqlite keeps the exact formatting of the sql instruction :

sqlite> .dump
BEGIN TRANSACTION;
CREATE TABLE All_Chr_CxCb_atleast1 ( 
TCIDTEXT,
STRAND  TEXT,
CHROMOSOME  TEXT,
START_POS   INTEGER,
STOP_POSINTEGER,
REPRESENT_POS   INTEGER,
TKIDINTEGER,
REPRESENT   TEXT,
SYMBOL1 TEXT,
SYMBOL2 TEXT,
LOCUSLINK   TEXT,
GO, BLOB,
CAA INTEGER,
CAC INTEGER,

Maybe something to change in the future ?

Thanks once again,

-- 
Charles


Re: [sqlite] Importing a CSV file

2005-02-25 Thread Brass Tilde
> CREATE TABLE All_Chr_CxCb_atleast1 (
> TCIDTEXT,
> STRAND  TEXT,
> CHROMOSOME  TEXT,
> START_POS   INTEGER,
> STOP_POSINTEGER,
> REPRESENT_POS   INTEGER,
> TKIDINTEGER,
> REPRESENT   TEXT,
> SYMBOL1 TEXT,
> SYMBOL2 TEXT,
> LOCUSLINK   TEXT,
> GO, BLOB,
> CAA INTEGER,


You've got an extra comma here after the "GO" field.  That makes the parser
think your trying to create field named GO, followed by one named BLOB, then
one named CAA.  Remove the comma.

That should have been obvious if you'd attempted to select something from
the table with headers turned on in the command line utility.