Re: Convert Function in Informix
Posted in 1997
Dean,
The best way go go about this is a stored procedure. I also have had
situations where I have to convert numbers to characters.
create procedure str_2_num (Mstring char(12)) returning decimal;define Mnumber decimal;
let Mnumber=Mstring;
return Mnumber;
end procedure
I haven't tried this one (it was just typed in from memory). But it should
give you what you need. HTH.
Joe
---
,-, |~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| =======
___|| | | -----
//_ || | CANNON EXPRESS | ----
,-----'| ~ | | | --
|o-----|__ |--`======_______________________________======___| ~~~~~~~~
`-(*)--===~~~~~~(*)(*)| (*)(*)| -------
-------------------------------------------------------------------------
Joseph Cullipher |E-mail: joseph@cannonexpress.com
PO Box 364 |opinions express are those of my own and
Springdale, AR 72764 USA |don't necessarily reflect those of my company
-------------------------------------------------------------------------
On 29 Apr 1997, DEAN CHEUK wrote:
> Does anyone know whether there is an internal convert function in Informix
> to convert string value to numeric value in the SQL statement (without
> using 4GL & ESQL/C ie the SQL statement can be run in dbaccess)?
>
> Besides, how can i execute the SQL statement under the Unix command line
> (IBM AIX machine)? Please give me the exact syntax ...
>
> Thanks
>
> Dean Cheuk
> dean_c@hk.super.net
>