Hi all,
In vsql how can I re-run a query with out typing it again? Is the query stored in a buffer like in sql*plus in Oracle?
Thanks!
How to re-run a query?
Moderator: NorbertKrupa
-
- Intermediate
- Posts: 87
- Joined: Wed Apr 25, 2012 8:10 am
Re: How to re-run a query?
Hi,
I think you dont need to retype it again. just click on up arrow key. It will appear and u can run it.
Let me know if it works.
Thanks,
Raj.
I think you dont need to retype it again. just click on up arrow key. It will appear and u can run it.
Let me know if it works.
Thanks,
Raj.
Rajasekhar.T|HP ATP Vertica Big Data Solutions V1
- JimKnicely
- Site Admin
- Posts: 1825
- Joined: Sat Jan 21, 2012 4:58 am
- Contact:
Re: How to re-run a query?
Hi,
The up arrow only repeats the last line entered. I think usli06 wants to re-send the entire buffer for execution.
The \g meta-command can be used to send query buffer to the server:
Example:
The up arrow only repeats the last line entered. I think usli06 wants to re-send the entire buffer for execution.
The \g meta-command can be used to send query buffer to the server:
Example:
Code: Select all
dbadmin=> select count(*)
dbadmin-> from test1
dbadmin-> join test2 on test2.col2 = test1.col1;
count
-------
1
(1 row)
dbadmin=> \g
count
-------
1
(1 row)
Jim Knicely
Note: I work for Vertica. My views, opinions, and thoughts expressed here do not represent those of my employer.
Note: I work for Vertica. My views, opinions, and thoughts expressed here do not represent those of my employer.
-
- Intermediate
- Posts: 87
- Joined: Wed Apr 25, 2012 8:10 am
Re: How to re-run a query?
Hi Jim,
Today i learned a new command. Thanks for the info.
Raj.
Today i learned a new command. Thanks for the info.
Raj.
Rajasekhar.T|HP ATP Vertica Big Data Solutions V1
Re: How to re-run a query?
Thanks, guys! This was what I needed!
-
- Intermediate
- Posts: 149
- Joined: Mon Apr 30, 2012 10:04 pm
- Location: New York
- Contact:
Re: How to re-run a query?
In addition to this, \s will show you the history of the commands that you have run and you can cut/paste to run previous queries.