Greetings! I have this file, import.sql, which contains a structure like this, BEGIN; INSERT OR REPLACE INTO Project_List values ( ... ); ... ... INSERT OR REPLACE INTO Project_List values ( ... ); END;
There are 253 INSERT OR REPLACE statements. What I am trying to do is to run it from the sqlite3 command line. I have a db in c:\temp\sqliteDB.sqlite3 which has the Project_List table. I can use, sqlite3 "c:\temp\sqliteDB.sqlite3" and copy and paste the content of the file, and it works fine. But I am trying to do this from the command line. Something like, sqlite3 "c:\temp\sqliteDB.sqlite3" -i c:\temp\import.sql But I don't know what to use from these help lines: 11:03:23.28>sqlite3 -help Usage: sqlite3 [OPTIONS] FILENAME [SQL] FILENAME is the name of an SQLite database. A new database is created if the file does not previously exist. OPTIONS include: -A ARGS... run ".archive ARGS" and exit -append append the database to the end of the file -ascii set output mode to 'ascii' -bail stop after hitting an error -batch force batch I/O -column set output mode to 'column' -cmd COMMAND run "COMMAND" before reading stdin -csv set output mode to 'csv' -echo print commands before execution -init FILENAME read/process named file -[no]header turn headers on or off -help show this message -html set output mode to HTML -interactive force interactive I/O -line set output mode to 'line' -list set output mode to 'list' -lookaside SIZE N use N entries of SZ bytes for lookaside memory -memtrace trace all memory allocations and deallocations -mmap N default mmap size set to N -newline SEP set output row separator. Default: '\n' -nullvalue TEXT set text string for NULL values. Default '' -pagecache SIZE N use N slots of SZ bytes each for page cache memory -quote set output mode to 'quote' -readonly open the database read-only -separator SEP set output column separator. Default: '|' -stats print memory stats before each finalize -version show SQLite version -vfs NAME use NAME as the default VFS -zip open the file as a ZIP Archive Thanks for the help. josé _______________________________________________ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users