Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 8623

Re: Dynamic SQL in AMDP/HANA

$
0
0

A colleague pointed out to me that specifics of your question is not answered in the references I offered earlier. Let me try to rectify that.

 

Could you please check out APPLY_FILTER in the SAP HANA SQL Script reference. This might be what you are looking for. In this case you will not need to use "EXEC 'sql_string'. You can do the following instead:

temp_result = SELECT c1 c2.. from T1 ...;
result = APPLY_FILTER(:temp_result, :my_dynamic_where_clause)

Don't be afraid that temp_result will be fetched and later filtered. If you do not read temp_result only result will be fetched after applying the filter.


Hope this answers your query better.



Viewing all articles
Browse latest Browse all 8623

Trending Articles



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