Quantcast
Channel: SCN : Discussion List - SAP HANA and In-Memory Computing
Viewing all articles
Browse latest Browse all 5653

Dynamic Where condition in SQL

$
0
0

Please suggest best ways to write dynamice SQL condition as my requirement deals with 9 input parameters and there will be scenarios where values won't be passed for around 7 input parameters.

 

One option is by using IF ELSE statement and write separate SELECT statements accordingly which will increase the code lines as 7 parameters are considered. I saw blogs where EXECUTE IMMEDIATE is not suggested to use.



Viewing all articles
Browse latest Browse all 5653

Trending Articles



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