On Wed, 8 Dec 2010 14:25:35 -0800, Kirk Clemons <k...@chiefarchitect.com> wrote:
>Thank you, >I how do I pipe in Windows? I have not had any luck using the pipe command. >I do want to make sure it is going in order so that I have a way of tracking >where it was if it fails. >At first it is just going to a TXT file and then I use .import to apply it to >the necessary tables. >The .dump command copies everything including the table not just the entries >in the table. The vertical bar, | , is the pipe. Two vertical bars, || , in a SQL statement is the concatenation operator. SQLite has no .export command, but you can simulate it using a query like SELECT col1 || ',' || col2 FROM mytable; You will have problems with embedded comma's, single quotes and control characters in text columns when you try to .import the result. Using the quote() function helps a little. .dump is much easier, you just have to filter the DDL statements out, although you still may have issues with embedded newlines. >From SQLite3 to SQLite3: C:\sqlite > sqlite3 mydb1.sqlite ".dump TABLENAME" | find "INSERT INTO" | sqlite3 mydb2.sqlite >From sqlite3 to some other database: C:\sqlite > sqlite3 mydb.db3 ".dump TABLENAME" | find "INSERT INTO" | your_other_sqltool_and_the_parameters_it_needs -- ( Kees Nuyt ) c[_] _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users