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.