Re: [sqlite] To edit in sqlite3 CLI multiline SQL statements?

2020-01-19 Thread Jose Isaias Cabrera

Simon Slavin, on Saturday, January 18, 2020 04:58 PM, wrote...
>
> On 18 Jan 2020, at 9:30pm, Csanyi Pal, on
>
> > can one edit a multiline SQL statement in the sqlite3 CLI?
>
> No.
>
> But if you make a multiline SQL statement in a text file you can paste it 
> into the CLI all in one operation.

Well, you could, but you need to hit the up arrow for every new line in that 
multiline, and edit the line. But, I agree with Simon: the best way to do it, 
is to use some text editor, and make the changes in the text editor and copy 
and paste to the CLI. Thanks.

josé
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] To edit in sqlite3 CLI multiline SQL statements?

2020-01-18 Thread Keith Medcalf

While there are lines to be edited:
  Press up arrow until line is recalled
  Edit the line
  Press the ENTER key to enter that line

Maybe you have to compile your own to include readline (on Linux), but it works 
for me.  Both Linux and Windows.

-- 
The fact that there's a Highway to Hell but only a Stairway to Heaven says a 
lot about anticipated traffic volume.

>-Original Message-
>From: sqlite-users  On
>Behalf Of Csanyi Pal
>Sent: Saturday, 18 January, 2020 14:31
>To: sqlite-users@mailinglists.sqlite.org
>Subject: [sqlite] To edit in sqlite3 CLI multiline SQL statements?
>
>Hello,
>
>can one edit a multiline SQL statement in the sqlite3 CLI?
>
>Say I entered the following multiline SQL statement:
>
>sqlite> SELECT 1 UNION ALL
>...> SELECT 2 UNION ALL
>...> SELECT 3
>...> ;
>
>Then after a while I want to run it again, then how can I use the bash
>history to get back my multiline SQL statement, to eventually modify it
>and re-run it again?
>
>Is there a way to do this in sqlite3 CLI?
>
>--
>Best, Paul Chany
>___
>sqlite-users mailing list
>sqlite-users@mailinglists.sqlite.org
>http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users



___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] To edit in sqlite3 CLI multiline SQL statements?

2020-01-18 Thread Simon Slavin
On 18 Jan 2020, at 9:30pm, Csanyi Pal  wrote:

> can one edit a multiline SQL statement in the sqlite3 CLI?

No.

But if you make a multiline SQL statement in a text file you can paste it into 
the CLI all in one operation.
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] To edit in sqlite3 CLI multiline SQL statements?

2020-01-18 Thread Csanyi Pal

Hello,

can one edit a multiline SQL statement in the sqlite3 CLI?

Say I entered the following multiline SQL statement:

sqlite> SELECT 1 UNION ALL
   ...> SELECT 2 UNION ALL
   ...> SELECT 3
   ...> ;

Then after a while I want to run it again, then how can I use the bash 
history to get back my multiline SQL statement, to eventually modify it 
and re-run it again?


Is there a way to do this in sqlite3 CLI?

--
Best, Paul Chany
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users