Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Substr and remove characters from field

Re: Substr and remove characters from field

From: LKBrwn_DBA <member30625_at_dbforums.com>
Date: Wed, 23 Jul 2003 20:05:54 +0000
Message-ID: <3144781.1058990754@dbforums.com>

Try this:

SQL>def dir='c:\test\hello\people\file.tif' SQL>select substr('&&dir',1,instr('&&dir','\',-1)) PATH from dual   2 /

PATH



c:\test\hello\people\

SQL>select substr('&&dir',instr('&&dir','\',-1)+1) FILE_NAME from dual   2 /

FILE_NAM



file.tif
SQL>
--

Posted via http://dbforums.com Received on Wed Jul 23 2003 - 15:05:54 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US