Handling exception no_data_found
I've just started using oracle but am having trouble with syntax when handling exceptions.
I am using a function similiar to this basic one but it's not quite working saying "Function returned without a value". It should be returning values though.
I'm pretty sure it has something to do with the exception part..any ideas?
CREATE check (vstreet IN CHAR)
RETURN CHAR
IS v_test VARCHAR2(20);
BEGIN
SELECT INTO v_test
FROM house
WHERE street = vstreet;
EXCEPTION
WHEN NO_DATA_FOUND THEN
v_test:= 'notfound';
RETURN (v_test);
END;