On Sat, 18 May 2019 at 00:34, Tony Papadimitriou <to...@acm.org> wrote:

> It’s quite often (for me, at least) the case I need to do something like
> this from the command line:
>
> >sqlite3.exe my.db “insert into t values(‘simple field’,’multi-line text
> copied from some other app’)
>
> The problem is the multi-line text cannot be copy-pasted directly into the
> command line as the first newline will terminate the command.  So, I’ve
> been using readline() like so:
>

I haven't tested on windows, but FWIW the interactive sqlite3 shell has no
such limitation - statements are free to span multiple lines. ie. you can
type:

   sqlite> INSERT INTO T VALUES('simple field', '«paste-
      ...> multi-line-
      ...> content»')
      ...> ;

I guess you'd also prefer to not have to type out the full INSERT statement
each time, but this kind of seems like a shell problem more than an sqlite
problem!
-Rowan
_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to