Options

Variable interpolation in vertica client

VF_DummyVF_Dummy
edited August 2019 in General Discussion

Hi all,
A basic question regarding variable interpolation in the vsql client - how can it be done within strings?
For example:

\set schemaname myschema
select count(*) from :schemaname.foo; -- works
select analyze_statistics(:schemaname'.foo', 10); -- throws error

The intent for the second command is to interpolate schemaname into the string being passed in to analyze_statistics. I've tried various forms of syntax, but without success. Thanks.

Tagged:
Sign In or Register to comment.

Can't find what you're looking for? Search the Vertica Documentation, Knowledge Base, or Blog for more information.