Re: substr instr
From: Jaromir D.B. Nemec <jaromir_at_db-nemec.com>
Date: Tue, 28 Jul 2009 21:45:16 +0200
Message-ID: <5FCAE8D33BB54275A62384B08E8D6C60_at_ADLA>
Hello,
Date: Tue, 28 Jul 2009 21:45:16 +0200
Message-ID: <5FCAE8D33BB54275A62384B08E8D6C60_at_ADLA>
Hello,
> Start net counter : 26798, 24794
>
> I need the number after the : but before the comma, for example, 26798
> in the last record
if the prefix string is constant you may save one instr...
select substr(eventtext,1,instr(eventtext,',')-1) from (
select replace(eventtext,'Start net counter : ',null) eventtext from
your_table
where eventtext like 'Start net counter : %'
)
regards,
Jaromir
-- http://www.freelists.org/webpage/oracle-lReceived on Tue Jul 28 2009 - 14:45:16 CDT