Subject | select string from numeric without conversion error |
---|---|
Author | Roger Crämer |
Post date | 2006-02-07T15:35:36Z |
Hi,
In a (simplified) tble
test ( x integer );
there's a single value so that the followng select
select * from test;
yields
X
============
4711
Doing a
select * from test where x = '4711';
results also in
X
============
4711
That's acceptable due to the possibility of conversion of '4711' into
the number 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"
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?
Tested with FB-SS 1.5.2 and 1.5.3 on Linux.
Roger
In a (simplified) tble
test ( x integer );
there's a single value so that the followng select
select * from test;
yields
X
============
4711
Doing a
select * from test where x = '4711';
results also in
X
============
4711
That's acceptable due to the possibility of conversion of '4711' into
the number 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"
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?
Tested with FB-SS 1.5.2 and 1.5.3 on Linux.
Roger