I have a SQL statement that I want to return 6 fields found from a MINUS statement that only compares 1 field from 2 tables. It works properly when the MINUS statement only returns 1 entry, but errors if it returns more than 1.
SELECT DROPPER_ID, EMAIL, ACTIVE, COUNTRY_CD, FIRST_NAME, LAST_NAME FROM PETE.DROPPER
WHERE DROPPER_ID = (
SELECT DROPPER_ID FROM PETE.DROPPER WHERE COUNTRY_CD <> 'USA' AND ACTIVE = 1
MINUS
SELECT DROPPER_ID FROM PETE.DROPPER_COMPARE);
How can I accomplish this?
Instead of using
=, try using theINstatement: