Re: Character to integer conversion function
Posted in 1996
Arif,
Informix has a section in its SQL: Guide to Reference which lists
how it handles the conversion of data types. The conversion is
built-in to the engine and doesn't require calling any function as
long as the conversion is valid. For example, if age is a
integer column in a personnel table then the following is completely
valid:
Select age from personnel where age > "15"; Informix takes the string and converts it to a int for you.
But the following is not valid:
Select age from personnel where age > "l5"; because the letter l does not convert to any integer.
I believe it's Chapter 3 in the aforementioned manual which goes
through the whole list. I hope this helps,
Tracy
=========================================================================
= Tracy W. Nedd =
= Banctec Inc. - DBA =
= Silver Spring, Md =
= tracyn@asd.banctec.com =
=========================================================================
= ALL RIGHTS RESERVED. =
= This posting is copyright and may be used only for the purposes =
= of professional study. Use of this posting in any commercial =
= environment is explicity prohibited. This posting may only be =
= reproduced for personal archival purposes. =
=========================================================================
>
> I am a former Oracle person who can't seem to find an INT() function
> that takes a string and give an integer value that you can use within
> an SQL command. (Like an atoi() in C). I'm sure there must be one.
> Any help appreciated
>
>