Subject Re: [firebird-support] isNumeric()
Author Ivan Prenosil
>From: "Lester Caine"
> I know I am going to have to create a UDF for this, but I'll ask the
> question first.
>
> I have a data source which has 'age' as a field. This is normally years,
> but also includes some text (3 mths, infant, 2 d, etc) There are not
> many text entries, and a lot I've filtered, but I need a check ideally
> in the CASE statement that pulls out the 'clean' numeric year entries,
> so I'm just left with the odd ones.

Do you just need to test whether the value is pure numeric,
or whether the string is number possibly followed by 'year' word,
or do you actually need to retrieve the value itself
('20 years' -> 20, '24 months' -> 2, ... ) ?

Ivan