All Forums Database
vsatyavic 2 posts Joined 07/14
31 Jul 2014
filter numeric letters from combination of alpha numeric letters and numeric letters

Hi All,
 
I have requirement to filter the numeric characters from the combination of alphanumeric nad numeric records.
Example: i/p: V3456TY
                     V5678YU
                     9856
                     B903RT
                     235
                     M8900TU
 
.. I want to get only the numerica characters like: 3456
                                                                               5678
                                                                               9856
                                                                               903
                                                                               235
                                                                               8900
 
Please suggest me the solution with the use of Teradata SQL Assistant..
 
 
Thanks,
Satvic

dnoeth 4628 posts Joined 11/04
31 Jul 2014

Hi Satvik,
what's your TD release?
In TD14 you can utilize a Regular Expression:

regexp_substr(col, '[0-9]+')

This will extract the first seqence of digits.

Dieter

vsatyavic 2 posts Joined 07/14
01 Aug 2014

Thanks Dieter.. it works fine..

Vishal88 1 post Joined 03/16
31 Mar 2016

Filter alphanumeric data from a string
 
Hello All,
 
I want to filter keyword (data {size} r/o),  act nat <phone number> , bb <size> , then size is alpha numeric followed by letter 'r/o, Phone number and size again respectivley ' from a record and need to validated it either matching found or not.
 
Example :- data 150mb r   or data mb o ----- (data {size} r/o)
                  act nat <9800066587> --- act nat <phone number>
                  bb 180 mb <r/o>  ----- bb <size>
Can you please suggest me workaround for this?
 
thanks

vishal

dnoeth 4628 posts Joined 11/04
01 Apr 2016

I don't understand what you want, can you show example, the correct result and why? 

Dieter

You must sign in to leave a comment.