All Forums Database
amchoubey 4 posts Joined 08/11
22 Aug 2011
How to extract numbers from string using teradata functions, operators?

I have a column that has both numbers and texts in the fields.
xyz 120 abc lmnop
xy 120
?/ 567 abc
.... 233

As you can see the fields can have numbers, texts, special chacters, null values, etc. If there is a no numbers in a field I want to return null for that.

I saw some forums that provide queries to address the problem but I those use SQL or Oracle functions, systax and it did not work in teradata. This forum provides a query on how to extract number from strings - DataDesign/extracting-numbers-with-sql-server. However, the query does not work in teradata because it uses sql functions and operations.
I am a beginner in the field so please help. Any comment would be very helpful. Thanks in advance!

You must sign in to leave a comment.