Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> select part of a string only
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! Received on Thu Feb 15 2007 - 04:50:24 CST