Albe Laurenz, per a report by Greg Smith that our sample function
doesn't quite match Oracle's behavior.
ELSE
RETURN pos + beg_index - 1;
END IF;
- ELSE
+ ELSIF beg_index < 0 THEN
ss_length := char_length(string_to_search);
length := char_length(string);
beg := length + beg_index - ss_length + 2;
beg := beg - 1;
END LOOP;
+ RETURN 0;
+ ELSE
RETURN 0;
END IF;
END;
ELSE
RETURN beg;
END IF;
- ELSE
+ ELSIF beg_index < 0 THEN
ss_length := char_length(string_to_search);
length := char_length(string);
beg := length + beg_index - ss_length + 2;
beg := beg - 1;
END LOOP;
+ RETURN 0;
+ ELSE
RETURN 0;
END IF;
END;