0

how do I import a sql query into a sqlite database? I'm using the sqlite manager add on in firefox, and there is an option to import SQL, but I don't see where I can connect to a server. I'm looking for some code in this format:

BEGIN TRANSACTION;
Server=servername;Database=dbname; User_Id=username;
Password=password;

SELECT * from table_name;

COMMIT;
md1630
  • 841
  • 1
  • 10
  • 28
  • One method would be to export the sqlserver query as a delimited text file containing the result set. You can then import it into a sqlite database file using the 'sqlite' command line application. – Jay Apr 28 '15 at 17:52
  • thanks Jay. That's obviously a viable alternative. Is there no way to pull sql server directly from sqlite?? – md1630 Apr 28 '15 at 19:00

1 Answers1

0

Try .read file-1 where in file-1 are the sql-statements exported from your server

Alternative .import file-2 table-1 file-2 an excel-formatted textfile table-1 will be automatically created if column names are provided in 1st line

Ref: https://www.sqlite.org/cli.html See also: http://igrali.com/2015/05/01/using-sqlite-in-windows-10-universal-apps/