I am using array binding to delete multiple rows in a table. The query is like
DELETE FROM Table WHERE Column = :Column
where Column is an array. The problem is, when one of the values is null, it is ignored, so the rows with Column being NULL are not deleted. The issue gets much more complicated when several conditions are involved (WHERE Column1 = :Column1 AND Column2 = :Column2...).
Is there a simpler way to do what I want than filtering the list of values for null and creating a bunch of different queries, where the null-comparison is replaced with IS NULL?
In the command I set the ArrayBindCount, but no other special property. This is how the parameter is added:
command.Parameters.Add(parameterName, dataType, value, ParameterDirection.Input);