Issue
When executing a parameter, the error message “Operands of = cannot be literal NULL” appears, causing the execution to fail.
Cause
If the SQL defined in the data source includes a parameter and the parameter is left unselected when executing, the parameter is assigned a NULL value, leading to this error.
Solution
This issue does not occur as long as a value is selected for the parameter.
To prevent this issue in advance, configure one of the following settings:
-
Disable the “Allow No Selection” option in the parameter settings.
- This ensures that a value is always selected.
- This ensures that a value is always selected.
-
Set the “Allow No Selection” option to “Return All Values” instead of "Return Empty Value."
- This ensures that a valid value is passed to the SQL instead of NULL.
- This ensures that a valid value is passed to the SQL instead of NULL.
By applying these settings, you can avoid this error.