Skip to content
Advertisement

Ignore Null Bind Variables in SQL

I am trying to create a dynamic SQL Statement which can be used to filter based on several parameters. But one of the caveats is that not all parameters will be available, so could 4 variables or could be 0.

This is my attempt at creating this query (small example with only one variable):

This however throws a compile error so I’m wondering if there is another way to implement this?

Advertisement

Answer

You can use:

User contributions licensed under: CC BY-SA
4 People found this is helpful
Advertisement