Follow the link found at the bottom of every message and remove yourself from the list
-----Ursprüngliche Nachricht----- Von: sqlite-users [mailto:sqlite-users-boun...@mailinglists.sqlite.org] Im Auftrag von Dianne Dunn Gesendet: Freitag, 08. März 2019 01:22 An: SQLite mailing list <sqlite-users@mailinglists.sqlite.org> Betreff: [EXTERNAL] Re: [sqlite] Import data into a temporary table Not sure how I got this please remove me Sent from my iPad > On Mar 7, 2019, at 4:00 PM, Keith Medcalf <kmedc...@dessus.com> wrote: > > > On Thursday, 7 March, 2019 14:45, Eric Tsau <erict...@gmail.com> asked: > >> Is it possible to add the option of importing data into a temporary >> table? > >> Currently you have to create a temporary table first before importing >> to it, or having to drop the table afterwards. > >> .import dump.csv temp.table >> or >> .import dump.csv attach.table > > Apparently not ;) It would appear that the .import shell command does not > know how to create tables in schema's other than "main" > > However, you can create a virtual table in the temp database using the csv > extension (since .import only works from the sqlite3 shell) ... > > create virtual table temp.tablename using csv(filename=filename.csv, > header=yes); > > The virtual table will be deleted when the connection is closed ... > since it is only a temporary thing. You could then create a duplicate > materialized table if you wished (but since you have a table attached > to a csv file why would you want to do that?) > > --- > The fact that there's a Highway to Hell but only a Stairway to Heaven says a > lot about anticipated traffic volume. > > > > > > _______________________________________________ > sqlite-users mailing list > sqlite-users@mailinglists.sqlite.org > http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users _______________________________________________ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users ___________________________________________ Gunter Hick | Software Engineer | Scientific Games International GmbH | Klitschgasse 2-4, A-1130 Vienna | FN 157284 a, HG Wien, DVR: 0430013 | (O) +43 1 80100 - 0 May be privileged. May be confidential. Please delete if not the addressee. _______________________________________________ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users