/* This function will return the number of occurences that p_sub_string appears in p_string Unlike instr that only counts the position of a sub-string in a string. */ CREATE OR REPLACE FUNCTION occurs (p_string IN VARCHAR2, p_sub_string IN VARCHAR2) RETURN