INSTR ---------------------(string to search, search pattern [, start [,occurrence]])
SUBSTR------------------ (original string, begin [,how far])
---------------------Data Till First Space--------------------------
SELECT substr(Name,1,instr(Name,' ',1,1)-1) from hr_operating_units
select substr('Oracle welcomes',1,instr('Oracle welcomes',' ',1,1)-1) from dual;
select substr('Oracle welcomes you',1,instr('Oracle welcomes you',' ',1,2)-1) from dual;------------------Data Till Second Sapce
SUBSTR------------------ (original string, begin [,how far])
---------------------Data Till First Space--------------------------
SELECT substr(Name,1,instr(Name,' ',1,1)-1) from hr_operating_units
select substr('Oracle welcomes',1,instr('Oracle welcomes',' ',1,1)-1) from dual;
select substr('Oracle welcomes you',1,instr('Oracle welcomes you',' ',1,2)-1) from dual;------------------Data Till Second Sapce
No comments:
Post a Comment