I have the following SQL within a stored procedure. Is there a way to remove the IF statement and pass the \'ASC\'/\'DESC\' option as a variable?
I know I could do t
Yes, but you have to use Dynamic Queries.
Take a look here.