cancel
Showing results for 
Search instead for 
Did you mean: 

Alphanumeric column

Former Member
0 Kudos

Hello,

we like to convert a column which is now varchar into int or float.

because we are trying now to use the following sql:

select NUM(colum name) from TABLE....

but the problem is, that the content of this column contains seperators and chars.

is there an sql function for checking if the value is numeric (like is_numeric() in php)?

your help is much appreciated

regards

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

create a function

CREATE FUNCTION is_numeric (c char(255)) RETURNS INTEGER DETERMINISTIC AS

TRY

SELECT NUM(:C) FROM SYSDBA.DUAL;

RETURN 1;

CATCH RETURN 0;

Regards,

Burkhard

Former Member
0 Kudos

Hi Burkhard,

thank you very much.

Worked 🙂

regards

Answers (0)