Igor, Michael
This syntax "create table copy as select * from input.t1;" is very new to
me but certainly does "the business" in conjuntion with "attach"
SQLIte Manager doesn't know what "dump" is
Irrespective...thank you very much for your help.


On 20 February 2013 13:56, Michael Black <mdblac...@yahoo.com> wrote:

> Sqlite3 run without any arguments
> But did I discover a bug too?
> Why doesn't .dump allow input.t1 to be shown?
>
> SQLite version 3.7.14.1 2012-10-04 19:37:12
> Enter ".help" for instructions
> Enter SQL statements terminated with a ";"
> sqlite> attach database "blah.db" as input;
> sqlite> create table input.t1(n);
> sqlite> insert into input.t1 values(1);
> sqlite> insert into input.t1 values(2);
> sqlite> create table copy as select * from input.t1;
> sqlite> .dump
> PRAGMA foreign_keys=OFF;
> BEGIN TRANSACTION;
> CREATE TABLE copy(n);
> INSERT INTO "copy" VALUES(1);
> INSERT INTO "copy" VALUES(2);
> COMMIT;
> sqlite> .dump input.t1
> PRAGMA foreign_keys=OFF;
> BEGIN TRANSACTION;
> COMMIT;
> sqlite> select * from t1;
> 1
> 2
>
>
> -----Original Message-----
> From: sqlite-users-boun...@sqlite.org
> [mailto:sqlite-users-boun...@sqlite.org] On Behalf Of e-mail mgbg25171
> Sent: Wednesday, February 20, 2013 7:46 AM
> To: General Discussion of SQLite Database
> Subject: Re: [sqlite] got selected items ok but can't update using them
>
> Igor, Michael
> Thank you very much for your advice re how to use Update with compound
> queries
>
> I'm currently trying to copy the rows of stmnts with a blank itm field to a
> temporary table.
> I don't think virtual tables are implemented in my programming language's
> interface and so wanted to
> copy the stmnts table from the real database where itm='' to a table in a
> :memory: database.
> I appreciate that the statement is normally
> insert into tbl values (fld1 integer, fld2 text);
> but how do I fill a table in a :memory: db with the contents of another in
> a real database?
> I'll keep looking into it.
>
> _______________________________________________
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to