Java external stored procedure returns ResultSet - how to insert this contents to a (temporary) table

Database

Java external stored procedure returns ResultSet - how to insert this contents to a (temporary) table

Hallo all,

I have created a Java external procedure that returns a dynamic result set. I can successfully call it and it returns the correct data. Now how can I store this returned data to a new (temporary) table?

Pseudocode to demonstrate what I want: CREATE VOLATILE TABLE temptable AS (SELECT * FROM myStoredProcedure());

Thanks, Björn

1 REPLY
Teradata Employee

Re: Java external stored procedure returns ResultSet - how to insert this contents to a (temporary) table

It's not possible to use a stored procedure's output dynamic result set as input to another SQL statement.

You will need to change your stored procedure to insert the data into the volatile table.