substr - How can I extract a substring from a string in Oracle, starting from a specific character? -
i need extract substring string in oracle.
for example, need extract string "dha-f-0046789"
"ra_pvac000275994.from.ins012.to.dha-f-0046789.file.1.2.xml"
.
i not want use position of characters extract substring because substring i'd extract may @ different positions in string. text wish extract may @ beginning of string.
sometimes substring wish extract may in format "f-dha-sds89"
rather "dha-f-0046789"
.
select substr ( ¶m, instr(¶m,'to.',1)+3, instr(substr(¶m,instr(¶m,'to.',1)+3),'.',1)-1 ) dual;
Comments
Post a Comment