On Mon, 21 Nov 2011 14:01:47 +0000, Simon Davies <simon.james.dav...@gmail.com> wrote:
>On 21 November 2011 13:41, SupportLists <supportli...@qlands.com> wrote: >> Hi, >> >> I am trying to use sqlite3 command shell with -init filename. >> >> The file has: >> >> CREATE TABLE griddata (id_suit VARCHAR(14) PRIMARY KEY,xpos DECIMAL(7),ypos >> DECIMAL(7),cellvalue DECIMAL(14,5) DEFAULT -9999); >> .separator "," >> .import /home/cquiros/temp/layers/layers/New/lgp001.csv griddata >> ALTER TABLE griddata ADD COLUMN colour char(9); >> ALTER TABLE griddata ADD COLUMN classCode integer; >> .quit >> >> All the commands works except .quit . How can I execute the shell with a >> -init and then exit when it finished processing the file? > >sqlite3 -init filename tst.db ".quit" > >or > >sqlite3 tst.db ".read filename" or sqlite3 tst.db <filename , in which case you don't need .quit, as sqlite3 quits on end-of-file. -- Regards, Kees Nuyt _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users