Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> Re: String Manipulation
SQL> select
substr('instance.company.com',1,instr('instance.company.com','.',1)-1)
from dual;
SUBSTR('
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-lReceived on Thu May 17 2007 - 12:52:19 CDT
![]() |
![]() |