Re: Character to integer conversion function
Posted in 1996
PLKapp — — source: Informix-list mailing list archive (1991-1998)
>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 You could try to force the SQL engine to perform that conversion for you, as in: SELECT col + 0 FROM t WHERE other_col + 0 < 100; I use this frequently with no problems. It comes in most handy when you wish to force a numeric sort order on char columns, as in: SELECT col + 0, ... FROM t WHERE {whatever} ORDER BY 1; Paul Kapp ----> PLKapp@aol.com -OR- plk@interactive.visa.com