Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Wed, 14 Apr 2004 @ 08:24:16 GMT


     
  <Prev Next>  
<<First
<Prev
Next> Last>>  


Subj:   Teradata SQL function for SQL server 'REPLACE'
 
From:   Agarwal, Rishi

Hi,

I need to rewrite the below SQL server query in Teradata.

     SELECT  ProgramID,
                REPLACE(ProgramName, '|', '!'),
                pt.ProgramTypeID,
                pt.ProgramTypeName
     FROM      AI_DW.DIM_PROGRAM p
               JOIN AI_DW.PROGRAM_TYPE pt
                   on pt.ProgramTypeID = p.ProgramTypeID

There is no REPLACE function in teradata. We can use CASE statement to achieve this. But what if there are more than one occurrence of '|' found in the string. Is there any other substitute of REPLACE function in teradata.


Thanks & Regards,

Rishi



     
  <Prev Next>  
<<First
<Prev
Next> Last>>  
 
 
 
 
 
 
 
 
  
  Top Home Privacy Feedback  
 
 
Copyright for the TeradataForum (TDATA-L), Manta BlueSky    
Copyright 2016 - All Rights Reserved    
Last Modified: 27 Dec 2016