Tuesday, October 20, 2015

Use of INSTR and SUBSTR Functions

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


No comments:

Post a Comment

Clear BNE Cache for WebADI Changes

It Sometime happens that WebAdi Changes doesn't reflect once migrated in controlled instances. Here are the quick steps(Generally perfor...