convert() function
Posted in 1999
Topics: General Discussion
Jerry A. Van Zant — — source: Informix-list mailing list archive (1991-1998)
Does Informix have any way to do datatype conversion within SQL? Such as MS SQL Servers convert function? Thanks
↪ replying to Jerry A. Van Zant
Paul Brown — — source: Informix-list mailing list archive (1991-1998)
Jerry A. Van Zant (jvz@opendata.com) wrote: : Does Informix have any way to do datatype conversion within SQL? Such : as MS SQL Servers convert function? In the 9.X engine you can CAST between data types. In fact, you have to, because the engine's parser turns constant strings into 'lvarchar' type instances, and from there it needs to CAST these into relevant data types. In prior versions, I have no idea. Mostly, there seems to be a set of undocumented relationships between types (INTEGER to DATE, VARCHAR to DATE etc).