Turn Off Row Counts in VSQL

Jim_KnicelyJim_Knicely Administrator, Moderator, Employee, Registered User, VerticaExpert
edited January 8 in Vertica Tips

The SET NOCOUNT command in SQL Server will stop the message indicating the number of rows affected by a Transact-SQL statement from being returned as part of the results.

You can accomplish the same thing in Vertica by shutting off the footer.

Example:

[[email protected] ~]$ vsql -c "SELECT * FROM dual;"
dummy
-------
X
(1 row)

[[email protected] ~]$ vsql -P footer=off -c "SELECT * FROM dual;"
dummy
-------
X

Helpful Links:
https://www.vertica.com/docs/9.2.x/HTML/Content/Authoring/ConnectingToVertica/vsql/CommandLineOptions/PAssignment--psetAssignment.htm

https://www.vertica.com/docs/9.2.x/HTML/Content/Authoring/ConnectingToVertica/vsql/Meta-Commands/psetNAMEVALUE.htm

Have fun!

Sign In or Register to comment.