[Replicant] .import still doesn't work...

A. F. Cano afc54 at comcast.net
Wed Sep 1 21:14:33 UTC 2021


On Wed, Sep 01, 2021 at 04:13:36PM -0400, A. F. Cano via Replicant wrote:
> On Wed, Sep 01, 2021 at 03:46:21PM -0400, A. F. Cano via Replicant wrote:
> > ...
> > The schema on both phones is identical, so I figured if I dump the
> > table:
> > 
> > > sqlite3 contacts2.db
> > SQLite version 3.27.2 2019-02-25 16:06:06
> > Enter ".help" for usage hints.
> > sqlite> .output call-log.sql
> > sqlite> .dump --preserve-rowids --newlines
> 
> Duh! I told it to dump the whole database.  This should have been:
> 
> sqlite> .dump --preserve-rowids --newlines calls
> 
> In that case it only dumps the calls table, albeit with the CREATE TABLE
> and other commands.  I'll try next to import this new file into the new
> contacts2.db

And after I tried to import that "calls" only sql file previously
dumped, I still get the same errors:

> sqlite3 contacts2.db
SQLite version 3.27.2 2019-02-25 16:06:06
Enter ".help" for usage hints.
sqlite> .echo on
sqlite> .bail on
.bail on
sqlite> select * from calls;
select * from calls;
sqlite> .import /tmp/call-log-only.sql calls
.import /tmp/call-log-only.sql calls
/tmp/call-log-only.sql:1: expected 24 columns but found 1 - filling the rest with NULL
/tmp/call-log-only.sql:1: INSERT failed: datatype mismatch
...
/tmp/call-log-only.sql:504: expected 24 columns but found 1 - filling the rest with NULL
/tmp/call-log-only.sql:504: INSERT failed: datatype mismatch
sqlite> select * from calls;
select * from calls;
sqlite>

Same 501 error messages.  I'll keep investigating.

Augustine


More information about the Replicant mailing list