Subject Re: [firebird-support] select string from numeric without conversion error
Author Ann W. Harrison
Roger Crämer wrote:

[ a table test with a single field x and a single row containing 4711]

>
> The select
> select * from test where x = 'TEST'
> results in the correct error
> select * from test where x = 'TEST';
>
> X
> ============
> Statement failed, SQLCODE = -413
>
> conversion error from string "Kühe"

Unh. That one stopped me cold - how did we go from an English
test to German cows?
>
> But the following select do not return anything:
> select * from test where x like 'TEST%';
> select * from test where x like 'TEST';
>
> Should the server not respond with the same error as in the '=' select?

No. The rules are different, according to the standard. I should
probably look up the details, but LIKE isn't like =

Regards,


Ann

Logic is a way of going wrong with confidence.