An expression of non-boolean type specified in a context where a condition is expected, near 'or

This actually does seem to be an issue with MS SQL syntax:

A workaround something like this seems to work:

select * from products
where ( {{ selSearchProductType.value || null }} IS NULL OR product_type_id = {{selSearchProductType.value}} )

2 Likes