This falls in the "There's gotta be an easier way" Category...
From within a PL/SQL block or proc I want to determine if a value exists in a table without putting the whole thing into a sub proc to handle the NO_DATA_FOUND exception.
Ideally I want to do the equivalent of the code below which fails because I can't execute a simple SELECT in a PL/SQL Block. If I make it an INTO I get the NO_DATA_FOUND error and it goes to the EXCEPTION or out all together.;
BEGIN
-- STUFF HERE ---
SELECT PropertyID
FROM BOLDED
WHERE PropertyID = 109;
IF SQL%NOTFOUND THEN
--Doing Stuff like INSERT INTO FEATURES...;
ELSE
--Doing Different Stuff like UPDATE FEATURES...;
END IF;
--MORE STUFF HERE and in the above IF statement --
END;