|
|
Archives of the TeradataForum
Message Posted: Fri, 02 May 2008 @ 20:49:37 GMT
Subj: | | Re: Pattern matching in Teradata SQL |
|
From: | | Michael Larkins |
Anomy:
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%',
'%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%')
Hope this helps,
Michael Larkins
Certified Teradata Master
Certified Teradata SQL Instructor
| |