cancel
Showing results for 
Search instead for 
Did you mean: 

Is_number() equivalent

Mari
New Contributor

i am getting the input value from the flat file. i am reading all the column values and have to load in the target table only if it is a number. Can i know is there any built-in function to validate or handle this.

3 REPLIES 3

cjhoward18
Employee
Employee

Hi @Mari

The isNan() function can tell you if the value is a number or not. Usage is like this:

isNaN(“4”) = false

isNaN(“foo”) = true

you can then use parseInt(“4”) to get the number 4 if needed

Mari
New Contributor

Thanks. It helps.