HTML Code:
select  substr('12345-6',1,(instr('12345-6','-')-1)) from dual;