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

Home -> Community -> Mailing Lists -> Oracle-L -> Re: String Manipulation

Re: String Manipulation

From: Jason Heinrich <jheinrich_at_pcci.edu>
Date: Thu, 17 May 2007 12:46:56 -0500
Message-ID: <C271FF40.259B8%jheinrich@pcci.edu>


Is this what you're looking for?

vString := 'instance.company.com';
vInstance := Substr(vString,1,instr(vString,'.')-1)

On 5/17/07 12:22 PM, Shivaswamy Raghunath wrote:

> Hello.
>
> I need to get "instance" from ('instance.company.com') on SQLPLUS. How I can
> do this?
>
> I tried to use REGEXP_SUBSTR function, but could not make much headway. Please
> note that, the LENGTH(instance) may vary.
>
> So I guess, give me before first occurence of period(.) in the string is what
> I should ask to get.
>
> TIA,
> Shiva



Jason Heinrich
Oracle Database Administrator
Pensacola Christian College
--
http://www.freelists.org/webpage/oracle-l
Received on Thu May 17 2007 - 12:46:56 CDT

Original text of this message

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