Re: [sqlite] Merge two sqlar files

2019-09-06 Thread Keith Medcalf
eng Yu >Sent: Friday, 6 September, 2019 18:09 >To: SQLite mailing list >Subject: Re: [sqlite] Merge two sqlar files > >OK. It works. But it seems that `.ar` is not necessary. > >import sqlite3 >infile1, infile2, outfile = sys.argv[1:] >conn=sqlite3.connect(outfil

Re: [sqlite] Merge two sqlar files

2019-09-06 Thread Peng Yu
a lot about anticipated traffic volume. > > > > >-Original Message- > > >From: sqlite-users On Behalf > > >Of Peng Yu > > >Sent: Friday, 6 September, 2019 17:04 > > >To: SQLite mailing list

Re: [sqlite] Merge two sqlar files

2019-09-06 Thread Peng Yu
but only a Stairway to Heaven says a > lot about anticipated traffic volume. > > >-Original Message----- > >From: sqlite-users On Behalf > >Of Peng Yu > >Sent: Friday, 6 September, 2019 17:04 > >To: SQLite mailing list > >Subject: [sqlite] Merge two sqla

Re: [sqlite] Merge two sqlar files

2019-09-06 Thread Peng Yu
OK. It works. But it seems that `.ar` is not necessary. import sqlite3 infile1, infile2, outfile = sys.argv[1:] conn=sqlite3.connect(outfile) c=conn.cursor() c.execute('ATTACH DATABASE ? AS d1', [infile1]) c.execute('ATTACH DATABASE ? AS d2', [infile2]) c.execute('CREATE TABLE sqlar AS SELECT *

Re: [sqlite] Merge two sqlar files

2019-09-06 Thread Keith Medcalf
a Stairway to Heaven says a lot about anticipated traffic volume. >-Original Message- >From: sqlite-users On Behalf >Of Peng Yu >Sent: Friday, 6 September, 2019 17:04 >To: SQLite mailing list >Subject: [sqlite] Merge two sqlar files > >Hi, > >UNION is for

[sqlite] Merge two sqlar files

2019-09-06 Thread Peng Yu
Hi, UNION is for tables in the same db file. Is there an easy command to combine two sqlar files? Thanks. https://www.sqlitetutorial.net/sqlite-union/ -- Regards, Peng ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org