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

Re: How to use a variable as a select for Columns

$
0
0

Hello Kai,

 

the need for that requirement is not really clear to me, but I think you are just trying out some things .

 

You can use Dynamic SQL statement EXEC for that in combination with a global temporary table. You have to build a statement that inserts the selected results into the global temporary table. This is necessary, because within dynamic sql you cannot address any SQLScript variables.

 

But please consider the notes for the dynamic sql regarding security and performance.

 

I would not recommend to use such an approach for a productive scenario. Trying it out and deleting it afterwards is ok .

 

Best Regards,

Florian


Viewing all articles
Browse latest Browse all 9165

Trending Articles