How to Fix the "Operands of = cannot be literal NULL" Error When Executing Parameters

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.

  • Set the “Allow No Selection” option to “Return All Values” instead of "Return Empty Value."

By applying these settings, you can avoid this error.