Discussion:
Informix server 7: Casting char in integer
(too old to reply)
Thorsten Geelhaar
2015-04-09 13:04:23 UTC
Permalink
Hello,

I need some help by casting an char to an integer value:

In Informix 9 Server something like the following works:
################################################################
SELECT e.id FROM tabE AS e, tabS AS s
WHERE
e.char_field[6,6]::integer = s.int_field AND s.id = 1
################################################################
Under Informix 7.25 this does not work, because the "::" casting
operator is not supported.

Is there another solution to convert the char to integer in Informix 7

Thanks for your help

Thorsten
s***@t-online.de
2015-04-13 17:51:04 UTC
Permalink
i have no SE to play with however:


SELECT e.id FROM tabE AS e, tabS AS s
WHERE
( e.char_field[6,6] + 0 ) = s.int_field AND s.id = 1


should work?

be carefull such querys do not use an index since it has to evaluate every row..


Superboer

Loading...