Subject Re: [firebird-support] check if string is numeric
Author Ivan Prenosil
> How can one check if a varchar type field value can be cast to
> integer with a stored procedure or UDF?

Simply try to cast it and catch possible exceptions. e.g.

CREATE PROCEDURE IsNumber (x VARCHAR(20))
RETURNS (ret CHAR(1)) AS
DECLARE VARIABLE tmp INTEGER;
BEGIN
ret = NULL;
IF (x IS NULL) THEN EXIT;
tmp = x;
ret = 'Y';
WHEN ANY DO ret = 'N';
END

Ivan
http://www.volny.cz/iprenosil/interbase/