OData filter options (handle null or empty values)

You can compare to null using the equality operator like this:

$filter=CustomerID eq null

In your case the query would degenerate to something like:

$filter=(CustomerID eq null) or (null eq null)

Which should work, but it’s not very nice.
Did you consider removing the predicate completely in such case?

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)