filter numeric letters from combination of alpha numeric letters and numeric letters

Database

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

Tags (1)
4 REPLIES
Junior Contributor

Re: filter numeric letters from combination of alpha numeric letters and numeric letters

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.

Re: filter numeric letters from combination of alpha numeric letters and numeric letters

Thanks Dieter.. it works fine..

Highlighted

Re: filter numeric letters from combination of alpha numeric letters and numeric letters

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

Junior Contributor

Re: filter numeric letters from combination of alpha numeric letters and numeric letters

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