Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Fri, 30 Jul 2010 @ 14:51:00 GMT


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


Subj:   Re: Deleting unwanted/duplicate records
 
From:   Fred W Pluebell

Glad that helped. One last comment regarding the fixed substring approach. If the "RT" code is always located in the 18th and 19th character position from the left, then either

     SUBSTR(I_IRD,18,2) = 'RT'

or the equivalent ANSI syntax

     SUBSTRING(I_IRD FROM 18 FOR 2) = 'RT'

should have worked.

Sometimes a string can have leading spaces or other anomalies that make it harder to find the proper expression. You could take one of your queries with SUBSTR that didn't work, and include the substring expression in the SELECT list to see what value it's actually comparing against. The CHAR2HEXINT function can also be useful in determining how the string is represented internally.



     
  <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: 15 Jun 2023