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

Home -> Community -> Usenet -> c.d.o.misc -> Re: select part of a string only

Re: select part of a string only

From: Ed Prochak <edprochak_at_gmail.com>
Date: 15 Feb 2007 09:39:14 -0800
Message-ID: <1171561154.429866.291040@h3g2000cwc.googlegroups.com>


On Feb 15, 8:38 am, "Thiko!" <biwo..._at_hotmail.com> wrote:
> On Feb 15, 11:14 am, "Thiko!" <biwo..._at_hotmail.com> wrote:
>
>
>
>
>
> > On Feb 15, 11:01 am, "Carlos" <miotromailcar..._at_netscape.net> wrote:
>
> > > On 15 feb, 11:50, "Thiko!" <biwo..._at_hotmail.com> wrote:
>
> > > > hi i have this text in v$parameter columns name and value:
>
> > > > name: log_archive_dest_1
>
> > > > value: LOCATION=/oraarch/oradata/flash_recovery_area/CPSLIVE/
> > > > archivelog
>
> > > > VALID_FOR=(ALL_LOGFILES,ALL_ROLES)
>
> > > > DB_UNIQUE_NAME=CPSLIVE1p
>
> > > > i do a select to return part of the LOCATION:
>
> > > > select replace(nvl(value,'NULL'),'LOCATION=') from v$parameter where
> > > > name = 'log_archive_dest_1';
>
> > > > this returns:
>
> > > > /oraarch/oradata/flash_recovery_area/CPSLIVE/archivelog
> > > > VALID_FOR=(ALL_LOGFILES,ALL_ROLES)
> > > > DB_UNIQUE_NAME=CPSLIVE1p
>
> > > > Anybody know how i can truncate in my select statement to retrun me
> > > > only '/oraarch/oradata/flash_recovery_area/CPSLIVE/archivelog' and not
> > > > anything after this. i do not wish to include the VALID_FOR etc after
> > > > it.
>
> > > > many thanks.
>
> > > > Thiko!
>
> > > Use instr() and substr() together.
>
> > > HTH.
>
> > > Cheers.
>
> > > Carlos.
>
> > oh blimey, can u not write it for me!? ;)
>
> > Thiko!
>
> cant use instr() or substr() unfortunately as it wont be generic on
> servers with different directory locations.- Hide quoted text -
>
> - Show quoted text -

for the INSTR() use what separates the locations from the rest of the string. (tab, newline space?)

and no we will not write it for you. 8^)   Ed Received on Thu Feb 15 2007 - 11:39:14 CST

Original text of this message

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