try not to use negative condition, like your: AND NOT (SUBSTR(FB_POL_LOB,1,4) IN ('FBHP','LIFE'). Try to use your query without this negative condition and add EXCEPT with same conditions plus AND (SUBSTR(FB_POL_LOB,1,4) IN ('FBHP','LIFE') -- without NOT.