sql formatting in vertica

Moderator: NorbertKrupa

Post Reply
iw84n01
Newbie
Newbie
Posts: 9
Joined: Tue Dec 03, 2013 4:10 am

sql formatting in vertica

Post by iw84n01 » Wed Dec 18, 2013 3:33 am

HI,

Just wondering is there anyway I can remove the number of row returned ?

something like set feedback off in oracle ;

select count(*) from sessions;
count
------------
7

(7 rows) => (possible to remove ?)

iw84n01
Newbie
Newbie
Posts: 9
Joined: Tue Dec 03, 2013 4:10 am

Re: sql formatting in vertica

Post by iw84n01 » Wed Dec 18, 2013 4:15 am

got the answer =)

\pset footer

debfawn
Beginner
Beginner
Posts: 47
Joined: Tue Jan 29, 2013 2:30 pm

Re: sql formatting in vertica

Post by debfawn » Thu Dec 19, 2013 3:17 pm

Thanks for sharing this. Does anyone know how to do the same when executing a query from the command line?

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

Re: sql formatting in vertica

Post by JimKnicely » Thu Dec 19, 2013 3:22 pm

Use the -P switch:

Code: Select all

[dbadmin@v1 ~]$ vsql -P footer=off -c "select count(*) from sessions;"
 count
-------
     1
Refer to the topic "SET NOCOUNT equivalent in Vertica" here: http://www.vertica-forums.com/viewtopic.php?f=6&t=619
Jim Knicely

Image

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

iw84n01
Newbie
Newbie
Posts: 9
Joined: Tue Dec 03, 2013 4:10 am

Re: sql formatting in vertica

Post by iw84n01 » Tue Jan 14, 2014 8:13 am

knicely87 wrote:Use the -P switch:

Code: Select all

[dbadmin@v1 ~]$ vsql -P footer=off -c "select count(*) from sessions;"
 count
-------
     1
Refer to the topic "SET NOCOUNT equivalent in Vertica" here: http://www.vertica-forums.com/viewtopic.php?f=6&t=619

@knicely87 thanks also for sharing =)

Post Reply

Return to “New to Vertica”