Skip to content
Advertisement

Tag: bind-variables

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

How to bind variable in string in SQL query?

I am using SQL Developer. When I want to bind value. Normally I use following syntax: but, I don’t know how to do that in string. The following query does not work. Why do I need it? Because my program runs a query in python and assigns something to bind variable: Answer Concatenate the prefix/suffix with the bind variable:

Advertisement