Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Substr and remove characters from field
Try this:
SQL>def dir='c:\test\hello\people\file.tif' SQL>select substr('&&dir',1,instr('&&dir','\',-1)) PATH from dual 2 /
PATH
SQL>select substr('&&dir',instr('&&dir','\',-1)+1) FILE_NAME from dual 2 /
FILE_NAM
![]() |
![]() |