Hope this helps The & operator performs logical "and" operation for bool operands and is not short circuited. It's not a sequence point. You cannot rely on the order of evaluation of the operands. However, it's guaranteed that both operands are evaluated.
Oracle and possible constant predicates in "WHERE" clause
wish help you to fix your issue I have a common problem with ORACLE in following example code:
CREATE INDEX IX_YOURNAME1 ON eventstable (NVL(p_customerId, 'x'));
CREATE INDEX IX_YOURNAME2 ON eventstable (NVL(p_eventTypeId, 'x'));
create or replace procedure usp_test
p_out OUT SYS_REFCURSOR
open p_out for
select e.Id from eventstable e
(NVL(p_customerId, 'x') = e.CustomerId OR NVL(p_customerId, 'x') = 'x')
AND (NVL(p_eventTypeId, 'x') = e.EventTypeId OR NVL(p_eventTypeId, 'x') = 'x')
order by Id asc;
How to implement a short-circuited "and" macro in Common Lisp?