Subject Re: [firebird-support] convert a string to a number in a where clause - without errors
Author Svein Erling Tysvær
I tried something very similar to

select * from daten where (case when sn similar to '[0-9]+' then cast
(sn as integer) else null end ) > 0

and it worked in Firebird 2.5.

Though I might have considered rewriting it

select * from daten where cast( iif( sn similar to '[[:DIGIT:]]+', sn, null ) as integer) > 0

Set