Internal type conversion

Robert Koch gms_xy at gmx.de
Fri Oct 17 11:37:47 CEST 2014


SELECT
	count(*)
FROM
	sapsr3.dfkkop
WHERE
	vkont >= '000802037649'
	and vkont < '000802038649'
;
+-------+
| L1    |
+=======+
| 81196 |
+-------+
1 tuple (1.8s)


SELECT
	count(*)
FROM
	sapsr3.dfkkop
WHERE
	vkont >= 000802037649
	and vkont < '000802038649'
;
+-------+
| L1    |
+=======+
| 81196 |
+-------+
1 tuple (1.5s)


SELECT
	count(*)
FROM
	sapsr3.dfkkop
WHERE
	vkont >= 000802037649
	and vkont < 000802038649
;
conversion of string 'VI0802037717' to type int failed.


Column "vkont" is defined as varchar(12), values are going from '000218123761' to 'ZZ0876213465'. 2nd statement is obviously doing some internal type conversion. 3rd statement fails. If there is done any kind of internal type conversion, I would expect that the outcome of this opereration must not depend on column's values.



More information about the developers-list mailing list