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: <jim.silverman_at_thomson.com>
Date: Thu, 17 May 2007 13:45:04 -0400
Message-ID: <E2157B37A63D2E4B9B00575021FC84D6012A5E64@tshusmian2msg01.ERF.THOMSON.COM>


The expression

     substr ('instance.company.com', 1, instr ('instance.company.com', '.') - 1)

should do what you want.



Jim Silverman
Senior Systems Database Administrator
Solucient, LLC - A Thomson Company
Telephone: 734-669-7641
FAX:            734-930-7611 
E-Mail:         jim.silverman_at_thomson.com 
		
		From: oracle-l-bounce_at_freelists.org
[mailto:oracle-l-bounce_at_freelists.org] On Behalf Of Shivaswamy Raghunath
		Sent: Thursday, May 17, 2007 1:22 PM
		To: Oracle-L
		Subject: String Manipulation
		
		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
--
http://www.freelists.org/webpage/oracle-l
Received on Thu May 17 2007 - 12:45:04 CDT

Original text of this message

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