Quantcast
Channel: SCN : Discussion List - SAP HANA Developer Center
Viewing all articles
Browse latest Browse all 6412

HANA Instr function to check for numbers?

$
0
0

Hi,

 

I am trying to create a calculated column to check the validity of another field for the presence of numbers in the string.

 

For example

 

Partner     Tel_number     Valid

 

1               1flowers          Yes

2               Telephone       No 

3               6046060543    Yes

 

My Expected result would be for partner 1 and 2 to return valid results and partner 2 to be invalid.

 

What is the correct syntax for instr to do this?

 

I've already tried the following:

 

IF(INSTR("TEL_NUMBER",IN(0,1,2,3,4,5,6,7,8,9)),0,1)

IF(INSTR("TEL_NUMBER",'1' OR '2' ...... ),0,1)

 

Thanks!

John


Viewing all articles
Browse latest Browse all 6412

Trending Articles