How to not echo SELECT statements to out file

Moderator: NorbertKrupa

Post Reply
sarah
Intermediate
Intermediate
Posts: 77
Joined: Mon Aug 27, 2012 1:34 pm

How to not echo SELECT statements to out file

Post by sarah » Mon Jan 28, 2013 2:00 pm

Hi,

How do i not echo the select statement to an outfile but keep my column headers?

Thank you.
Have a GREAT day!

User avatar
JimKnicely
Site Admin
Site Admin
Posts: 1825
Joined: Sat Jan 21, 2012 4:58 am
Contact:

Re: How to not echo SELECT statements to out file

Post by JimKnicely » Mon Jan 28, 2013 3:42 pm

Hi Sarah,

By default I believe that vsql won't display the SELECT statements.

Code: Select all

bash-3.2$ cat jim.sql
select * from dual;

bash-3.2$ vsql -f jim.sql
SET
 dummy
-------
 X
(1 row)
It's only when we add the -e option (echo commands sent to server) that the SELECT statement shows up in the output:

Code: Select all

bash-3.2$ vsql -f jim.sql -e
set search_path="$user", intersect_wh, public, v_catalog, v_monitor, v_internal
SET
select * from dual;
 dummy
-------
 X
(1 row)
Are you using the -e option?
Jim Knicely

Image

Note: I work for Vertica. My views, opinions, and thoughts expressed here do not represent those of my employer.

Post Reply

Return to “vSQL”