Hello,
I propose the follwing:
SQL> define str1='Person-12345-(thanks)'
SQL> select substr(truc,1,instr(truc,'-') -1)
from (
select substr('&str1',instr('&str1','-')+1, length('&str1')) as
truc
from dual);
I did use str1 because it is shorter...
Have fun,
Philippe Valentin
(Oracle DBA 8i,9i)
dwilliams (AT) twininteractive (DOT) com (Gotosleep) wrote in message news:<d3f2e241.0407200759.e6204a (AT) posting (DOT) google.com>...
Quote:
I have field that looks like this
Person-12345-(thanks)
I need to select the number in the middle. 12345
Please help...
also the first text PERSON could be any size...
Thank you |