Importing NOT Working (pls)

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Importing NOT Working (pls)

Richard-118
Well,

Did this:

sqlite3 test2.db
create Table T (A, B, C );
.separator ,
.import 'sqtest2.txt' T

It looks like it working, but the file size is still
4K and not 170 Megs.

Please note:
I exported this database as a Tab delimiter file,
then as a Comma, delimiter file...

** Got it to import, however it only imports the first record
ie:

sqlite> select * from T;
-180,90,NaN
sqlite>

There's a few more hundred thousands.....
is there suppose to be some kinda of loop statement
like repeat again..

TKS-
Richard
Reply | Threaded
Open this post in threaded view
|

Re: Importing NOT Working (pls)

Puneet Kishor

On Oct 3, 2005, at 11:44 AM, Richard wrote:

> Well,
>
> Did this:
>
> sqlite3 test2.db
> create Table T (A, B, C );
> .separator ,
> .import 'sqtest2.txt' T
>
> It looks like it working, but the file size is still
> 4K and not 170 Megs.
>
> Please note:
> I exported this database as a Tab delimiter file,
> then as a Comma, delimiter file...
>
> ** Got it to import, however it only imports the first record
> ie:

it is likely that your line endings are Mac (you are on a Mac, iirc).
Open the tab file in a text editor such as BBEdit (or Textwrangler --
free from Barebones) and change the line endings to Unix. Then try
again.


>
> sqlite> select * from T;
> -180,90,NaN
> sqlite>
>
> There's a few more hundred thousands.....
> is there suppose to be some kinda of loop statement
> like repeat again..
>
> TKS-
> Richard
>
--
Puneet Kishor