Quantcast
Channel: SCN: Message List - SAP HANA Developer Center
Viewing all articles
Browse latest Browse all 9165

Re: is it possible to have a dynamic output table type for a procedure

$
0
0

Hi Glen,

 

     From my understanding of your scenario, we can solve this using two stored procedures, and this worked for me

 

  1. 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
  2. Display Procedure
    • Just put OUTPUT_TABLE_TYPE = SELECT * FROM INPUT_TABLE_TYPE;


Hope this help you.


Regards,

HarikrishnanS


Viewing all articles
Browse latest Browse all 9165

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>