RE: [sqlite] Is there an inverse for .import?

2007-03-09 Thread Anderson, James H \(IT\)
Not an option for what I'm doing. -Original Message- From: Rich Shepard [mailto:[EMAIL PROTECTED] Sent: Friday, March 09, 2007 5:19 PM To: sqlite-users@sqlite.org Subject: Re: [sqlite] Is there an inverse for .import? On Fri, 9 Mar 2007, Dennis Cote wrote: > You can get csv out

RE: [sqlite] Is there an inverse for .import?

2007-03-09 Thread Anderson, James H \(IT\)
Yes, unlike .dump, that works. Thanks very much. jim -Original Message- From: Dennis Cote [mailto:[EMAIL PROTECTED] Sent: Friday, March 09, 2007 5:05 PM To: sqlite-users@sqlite.org Subject: Re: [sqlite] Is there an inverse for .import? Anderson, James H (IT) wrote: > I need to &quo

Re: [sqlite] Is there an inverse for .import?

2007-03-09 Thread Rich Shepard
On Fri, 9 Mar 2007, Dennis Cote wrote: You can get csv output from sqlite using the .mode command to specify the output format and the .output command to set the output file. .mode csv .headers on .output mytable.csv select * from mytable; .output stdout Or, use the SQL format

Re: [sqlite] Is there an inverse for .import?

2007-03-09 Thread Dennis Cote
Anderson, James H (IT) wrote: I need to "export" a table to a file in the same format as used by .import, but I don't see any such cmd. Am I missing something, or does such a cmd just not exist? jim You can get csv output from sqlite using the .mode command to specify the output format and

RE: [sqlite] Is there an inverse for .import?

2007-03-09 Thread Anderson, James H \(IT\)
To: sqlite-users@sqlite.org Subject: Re: [sqlite] Is there an inverse for .import? >From the SQLite shell, you can send the output to a file using .output myfile.txt So .output myfile.txt select * from mytable; .output stdout will get you a pipe-delimited myfile.txt. You can change the de

Re: [sqlite] Is there an inverse for .import?

2007-03-09 Thread Scott Hess
Sorry, didn't read long enough. Fire up sqlite3 and type ".help". To "export" a table, you can do: .output /tmp/export select * from TABLE; .output stdout To import, you do: .import /tmp/export TABLE You can adjust the separator using .separator. The inverse of .dump would be

Re: [sqlite] Is there an inverse for .import?

2007-03-09 Thread Scott Hess
On 3/9/07, Gunnar Roth <[EMAIL PROTECTED]> wrote: Anderson, James H (IT) schrieb: > I need to "export" a table to a file in the same format as used by > .import, but I don't see any such cmd. Am I missing something, or does > such a cmd just not exist? Maybe its dumb but its called .dump ;-)

RE: [sqlite] Is there an inverse for .import?

2007-03-09 Thread Anderson, James H \(IT\)
Thanks, I'll try that. I misunderstood the description of .dump to mean that it dumped in SQL insert format. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of P Kishor Sent: Friday, March 09, 2007 12:12 PM To: sqlite-users@sqlite.org Subject: Re: [sqlite

Re: [sqlite] Is there an inverse for .import?

2007-03-09 Thread Clark Christensen
>From the SQLite shell, you can send the output to a file using .output myfile.txt So .output myfile.txt select * from mytable; .output stdout will get you a pipe-delimited myfile.txt. You can change the delimiter using the .separator command, or you can use .mode to use a predefined format.

Re: [sqlite] Is there an inverse for .import?

2007-03-09 Thread Leonardo Mateo
On 3/9/07, Anderson, James H (IT) <[EMAIL PROTECTED]> wrote: I need to "export" a table to a file in the same format as used by .import, but I don't see any such cmd. Am I missing something, or does such a cmd just not exist? You should set the output to that file by using .output command and

Re: [sqlite] Is there an inverse for .import?

2007-03-09 Thread Gunnar Roth
Anderson, James H (IT) schrieb: I need to "export" a table to a file in the same format as used by .import, but I don't see any such cmd. Am I missing something, or does such a cmd just not exist? Maybe its dumb but its called .dump ;-) regards, gunnar

Re: [sqlite] Is there an inverse for .import?

2007-03-09 Thread P Kishor
On 3/9/07, Anderson, James H (IT) <[EMAIL PROTECTED]> wrote: I need to "export" a table to a file in the same format as used by .import, but I don't see any such cmd. Am I missing something, or does such a cmd just not exist? .dump -- Puneet Kishor http://punkish.eidesis.org/ Nelson Inst.