INSTR Returns the position of a String within a String. For more information see Oracle instr function
SUBSTR Returns a substring. For more information see Oracle substring
Syntax of SUBSTR:
SUBSTR([input],[start],[length])
Example 1:
select substr('orange.apple',1,(instr('orange.apple','.')) - 1)
from dual
Output:first
Example 2:
select substr('orange.apple',1,(instr('orange.apple,'.')) - 1) as First,
substr('orange.apple', (instr('orange.apple','.')) + 1) as Second
from dual
Output:First Second
orange apple