Boolean Wrapper Function used in DML where clause
Hi,
I am looking for an explanation of the following behaviour.
I have a pl/sql function that checks to see if a record has expired and returns a boolean:
FUNCTION has_expired(p_record_ref IN NUMBER) RETURN BOOLEAN IS
BEGIN
-- Processing
RETURN (boolean result of processing)
END;
I know that I cannot use this function directly in sql as it does not understand boolean data types.
I have created a wrapper function that will return Y where the boolean function returns TRUE and N where FALSE.
I can now use this wrapper function in selecting from a table to return any records that have expired - this is working correctly:
1