SELECT SUBSTR('1223_1',0,INSTR('1223_1','_', 1, 1)-1) "INSTRING", INSTR('1223_1','_', 1, 1) FROM DUAL