Andre du Plessis wrote:
HI, how can I use .dump or something similar but specify a where clause,
I cant see that the .dump command allows this,

Without any arguments it seems to dump the whole db, the only argument
supported is the table name,

I would like to be able to do something like:

.dump table1 where ID > 1000

I don't have a problem with the INSERT into statements, in fact I think
I prefer it because the main idea is to extract parts of the db
(revisions),

And then to be able to rebuild the db in case of corruption...

I know there is also the COPY command in SQL I have not really tried it
by the documentation it seems to be able to dump the table in comma or
tab delimited, but Preferably I don't want to write too much code to do
this.

Andre,

You can use the insert mode in the shell to do what you want. It will format the select output as insert statements.

   .mode insert
   select * from table1 where ID > 1000;

This doesn't generate the transaction wrapper, or the table's create statement, but you can add those yourself if needed.

HTH
Dennis Cote

-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------

Reply via email to