Hey,
Is there a feature available in Vertica when writing scripts that is similar to the SET NOCOUNT command in SQL Server which will stop the message indicating the number of rows affected by a Transact-SQL statement from being returned as part of the results.
Thank you!
SET NOCOUNT equivalent in Vertica
Moderator: NorbertKrupa
SET NOCOUNT equivalent in Vertica
Thank, Fred
Re: SET NOCOUNT equivalent in Vertica
Hi!
Do you want standard output without last row where rows counted, but with a fist row with columns names?
Do you want standard output without last row where rows counted, but with a fist row with columns names?
Re: SET NOCOUNT equivilent in Vertica
Hey,
I would just like the output to not have the row count.
So for a simple statement like "select count(*) from dual;" I would like to get back just:
count
-------
1
... not this:
count
-------
1
(1 row)
Thanks for the quick response, btw!
I would just like the output to not have the row count.
So for a simple statement like "select count(*) from dual;" I would like to get back just:
count
-------
1
... not this:
count
-------
1
(1 row)
Thanks for the quick response, btw!
Thank, Fred
Re: SET NOCOUNT equivalent in Vertica
Hi!
vsql has no such ability/option (it vsql issue, not Vertica). If you don't need header so try option "tuples only" (`\t` - inside of script or `-t` as command line arg).
Do you will accept workarounds?
vsql has no such ability/option (it vsql issue, not Vertica). If you don't need header so try option "tuples only" (`\t` - inside of script or `-t` as command line arg).
Do you will accept workarounds?
Re: SET NOCOUNT equivilent in Vertica
Hi sKwa,
Sure, I'm willing to use a work around
I wonder if Vertica plans on adding an option to vsql in the future for this?
Thanks!!!
Sure, I'm willing to use a work around
I wonder if Vertica plans on adding an option to vsql in the future for this?
Thanks!!!
Thank, Fred
Re: SET NOCOUNT equivalent in Vertica
Hi!
Sorry I was wrong. No work around - direct solution: variable FOOTER
Sorry I was wrong. No work around - direct solution: variable FOOTER
- From shell:
Code: Select all
[ ~ ]$ vsql -P footer=off -c "select * from nums limit 5" id ---- 1 2 3 4 5
- From vsql or script:
Code: Select all
dbadmin=> \pset footer off Default footer is off. dbadmin=> select * from nums limit 5; id ---- 1 2 3 4 5 dbadmin=>
Re: SET NOCOUNT equivalent in Vertica
That's perfect!!! You're brilliant, sKwa! Thanks, man!
Thank, Fred