I am querying APEX_COLLECTION view to see if a record exists and when it does not, I am getting NO_DATA_FOUND exception. To handle that I used an anonymous block:
BEGIN
SELECT c001, c002 INTO l_var1, l_var2
FROM APEX_COLLECTION
WHERE collection_name = 'TEST' AND c003='test';
EXCEPTION
WHEN NO_DATA_FOUND
l_var1 := NULL;
l_var2 := NULL;
END;
Is there a better way to handle this?
Did not find better solution to my issue besides using anonymous block and capturing a NO_DATA_FOUND exception.