Home Page for the TeradataForum

Archives of the TeradataForum

Message Posted: Fri, 02 May 2008 @ 20:49:37 GMT

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

Subj:   Re: Pattern matching in Teradata SQL
From:   Michael Larkins


You wrote:

  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%',
       and name like any ('%R_0%','%R_1%','%R_2%','%R_3%','%R_4%','%R_5%',

Hope this helps,

Michael Larkins
Certified Teradata Master
Certified Teradata SQL Instructor

  <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