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: David Litchfield <david_at_databasesecurity.com>
Date: Thu, 17 May 2007 18:52:19 +0100
Message-ID: <029101c798ac$227a5d70$9500a8c0@databasesecurity.com>


SQL> select
substr('instance.company.com',1,instr('instance.company.com','.',1)-1) from dual;

SUBSTR('



instance

HTH,
David

> 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
>

--
E-MAIL DISCLAIMER

The information contained in this email and any subsequent
correspondence is private, is solely for the intended recipient(s) and
may contain confidential or privileged information. For those other than
the intended recipient(s), any disclosure, copying, distribution, or any
other action taken, or omitted to be taken, in reliance on such
information is prohibited and may be unlawful. If you are not the
intended recipient and have received this message in error, please
inform the sender and delete this mail and any attachments.

The views expressed in this email do not necessarily reflect NGS policy.
NGS accepts no liability or responsibility for any onward transmission
or use of emails and attachments having left the NGS domain.

NGS and NGSSoftware are trading names of Next Generation Security
Software Ltd. Registered office address: 52 Throwley Way, Sutton, SM1
4BF with Company Number 04225835 and VAT Number 783096402
--
http://www.freelists.org/webpage/oracle-l
Received on Thu May 17 2007 - 12:52:19 CDT

Original text of this message

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