Forum: Building VoltDB Applications

Post: Using a system stored procedure as a subquery?

Using a system stored procedure as a subquery?
cfogelberg
Sep 29, 2016
I need to write some user-friendly SQL that returns information about the loaded VoltDB schema. Is this possible using Volt 5.8.1 or later versions?

An example of the kind of query I'm trying to write:

select column_name, data_type from (exec @SystemCatalog COLUMNS) as schema_data;


This isn't valid SQL and fails with the error "user lacks privilege or object not found: EXEC". Are there any meta-tables that I can use instead (ala postgres's information_schema.columns) or a way to execute a stored procedure as a subquery?

Thanks,
Christo
rmorgenstein
Oct 14, 2016
The sysprocs cannot be used in queries. You will need to do this on the client.

Ruth