Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Wed, 07 May 2008 @ 11:17:12 GMT


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


Subj:   Re: Pattern matching in Teradata SQL
 
From:   Signorell Andri

This is the point! Your first solution, Michael, is the one for me to use (thnx for that, btw!):

  I need to find patterns in a varchar field like '%R[0-9]%' where name like any ('%R0%','%R1%','%R2%','%R3%','%R4%','%R5%', '%R6%','%R7%','%R8%','%R9%')  



If you need to find the above followed by another 0-9 digit (two of them):

where name like any ('%R0%','%R1%','%R2%','%R3%','%R4%','%R5%',
                       '%R6%','%R7%','%R8%','%R9%')
      and
      name like any ('%R_0%','%R_1%','%R_2%','%R_3%','%R_4%','%R_5%',
                       '%R_6%','%R_7%','%R_8%','%R_9%')

However, for other problems Royson's idea could be promising. Is there a way to find the position of the nth character in a string?


Andri



     
  <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