Re: Convert CHAR to NUMERIC and vice versa
Posted in 1993
> Quoting Mike Stroganov... > } > } Can we convert CHAR datatype to NUMERIC and vice versa in 4GL or SQL language? > } > Informix products do this automatically for you provided that the data is > compatable, ie. you can't put a "hello" into a SMALLINT but you can put a "13" > into a SMALLINT. > > DAS > -- > David Snyder @ Snide Computer Services - Folcroft, PA Current Release > is db4glgen-3.9 Additional info regarding this subject: Prior to release 4.10 you could trap conversion errors: str char(4) num integer whenever error continue let num = str if status <> 0 then "not a number" end if whenever error stop (Informix/User) (Informix/User) This (bug/ feature) or (feature/ bug ) was fixed in 4.10. -- Michael J. Kuhn Consultant phone:410-254-7060 Email: rhlab!kuhn@uunet.uu.net or uunet!rhlab!kuhn c/o Baltimore Rh Typing Laboratory, Inc. phone:410-225-9595