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: SQL question

RE: SQL question

From: Powell, Mark D <mark.powell_at_eds.com>
Date: Thu, 2 Feb 2006 16:37:18 -0500
Message-ID: <5A14AF34CFF8AD44A44891F7C9FF410505EA5937@usahm236.amer.corp.eds.com>


Wouldn't that be a job for the replace function? See SQL manual  

replace(column,'target','replacement')  

HTH -- Mark D Powell --    


        From: oracle-l-bounce_at_freelists.org
[mailto:oracle-l-bounce_at_freelists.org] On Behalf Of Johan Muller

	Sent: Thursday, February 02, 2006 3:46 PM
	To: oracle-l_at_freelists.org
	Subject: SQL question
	
	
	How can I use  sql (decode I think) to do the following;
	
	select file_name from dba_data_files;
	
	
	/u02/oradata/elfd/arch_closet_idx_01.dbf
	
	21 rows selected.
	
	SQL> l
	
	Now I want to change the /elfd/ (sid) to /elfp/ in each string. 
	
	Any idea (decode). I tried translate and replace but only
manages to return the (new) sid value of elfp.
	-- 
	Johan Muller
	Oracle DBA
	(214) 676 2147 anytime.
	
	"Democracy is two wolves and a lamb voting on what to have for
lunch. 
	Liberty is a well-armed lamb contesting the vote." --Benjamin
Franklin                  
--
http://www.freelists.org/webpage/oracle-l
Received on Thu Feb 02 2006 - 15:37:18 CST

Original text of this message

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