Hi Glen,
From my understanding of your scenario, we can solve this using two stored procedures, and this worked for me
- Dynamic Procedure (Dynamic Table Type Creation)
- This procedure should have one input parameter(String), for table name
- From the table name we can get the structure of the table (column names and data types)
- Now drop the old input and output table types of the second procedure
- Create that input and output table types (same name) with the new structure obtained from the table
- Call that second procedure by passing table as input parameter
- Display Procedure
- Just put OUTPUT_TABLE_TYPE = SELECT * FROM INPUT_TABLE_TYPE;
Hope this help you.
Regards,
HarikrishnanS