Re: [firebird-support] convert a string to a number in a where clause - without errors
On 2018-01-16 09:52, Rustam rusta...@ukr.net [firebird-support] wrote: > I think better way is to control input on client. > If this is impossible you can try "spike": write selectable stored > procedure with exception handler "when any do ..." Or use a Firebird 3 Function. Mark
Re: [firebird-support] convert a string to a number in a where clause - without errors
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
[firebird-support] convert a string to a number in a where clause - without errors
I think better way is to control input on client. If this is impossible you can try "spike": write selectable stored procedure with exception handler "when any do ..."