To exucte group of SQL Statements ( with parameter values) we can create Macro in Teradata. In the similar way do we have any objects in Vertica?
You can certainly create a vsql / sql file and put all your statements into it and run he file all together.
the only thing to take care is, the SQL statements should be seperated by a semicolon ';'
Regarding parameters, Vertica is less flexible in this area, but the kind of requirement you have, it is possible.
You can declare variable and use the varaible in place of paramters, then while executing the script, you need to pass the variables with values and use these variables inside the script / sql to get replaced.
Hope this helps.
It depends on your client, too. Our drivers (JDBC, ODBC, etc) has support for prepared statements. See the API documentation for details. `vsql` has the "\set name value" syntax to store a value and the :name syntax to retrieve it.
Can't find what you're looking for? Search the Vertica Documentation, Knowledge Base, or Blog for more information.