There is an error, try it and you will see.perhaps a having clause like this:
having @param <> 1 or @param is null or @sum(field3) > 0.1
I want to do something like:
If (@param = 1) then do the having clause
There is an error, try it and you will see.perhaps a having clause like this:
having @param <> 1 or @param is null or @sum(field3) > 0.1