Re: how do you convert from hex to integer using SQL ?
Posted in 2005
--0__=88BBE513DFFE4BB38f9e8a93df938690918c88BBE513DFFE4BB3 Content-type: multipart/alternative; Boundary="1__=88BBE513DFFE4BB38f9e8a93df938690918c88BBE513DFFE4BB3" --1__=88BBE513DFFE4BB38f9e8a93df938690918c88BBE513DFFE4BB3 Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: quoted-printable Its pretty simple actually ..:-) u can try something like: select '0xa' + 0 from systables where tabid =3D 1; It'll print the integer value of the hex. U can substitute ur column instead of the hard-coded value in the example. Thanx much, Rajib Sarkar Advisory Software Engineer DB2/UDB Regional Advanced Support IBM Data Management Group If we all did the things we are capable of doing, we would literally astound ourselves. -- T. Edison = darren.edgerton@r = eece.com.au = Sent by: = To owner-informix-li informix-list@iiug.org = st@iiug.org = cc = Subj= ect 01/05/2005 12:09 how do you convert from hex to = AM integer using SQL ? = = = Please respond to = darren.edgerton = = = Hi, i need to conv from Hex to Integer can this be done using SQL with Informix ?? ie select integer(hex_data_column) from mytable thanks, DSE = --1__=88BBE513DFFE4BB38f9e8a93df938690918c88BBE513DFFE4BB3 Content-type: text/html; charset=US-ASCII Content-Disposition: inline Content-transfer-encoding: quoted-printable <html><body> <p>Its pretty simple actually ..:-)<br> <br> u can try something like:<br> <br> select '0xa' + 0 from systables where tabid =3D 1;<br> <br> It'll print the integer value of the hex. U can substitute ur column in= stead of the hard-coded value in the example.<br> <br> Thanx much,<br> <br> Rajib Sarkar<br> Advisory Software Engineer<br> DB2/UDB Regional Advanced Support<br> IBM Data Management Group<br> <br> <br> If we all did the things we are capable of doing, we would literally as= tound ourselves. -- T. Edison<br> <br> <img src=3D"cid:10__=3D88BBE513DFFE4BB38f9e8a93df938@us.ibm.com" width=3D= "16" height=3D"16" alt=3D"Inactive hide details for darren.edgerton@ree= ce.com.au">darren.edgerton@reece.com.au<br> <br> <br> <table width=3D"100%" border=3D"0" cellspacing=3D"0" cellpadding=3D"0">= <tr valign=3D"top"><td style=3D"background-image:url(cid:20__=3D88BBE51= 3DFFE4BB38f9e8a93df938@us.ibm.com); background-repeat: no-repeat; " wid= th=3D"40%"> <ul> <ul> <ul> <ul><b><font size=3D"2">darren.edgerton@reece.com.au</font></b><font si= ze=3D"2"> </font><br> <font size=3D"2">Sent by: owner-informix-list@iiug.org</font> <p><font size=3D"2">01/05/2005 12:09 AM</font> <table border=3D"1"> <tr valign=3D"top"><td width=3D"168" bgcolor=3D"#FFFFFF"><div align=3D"= center"><font size=3D"2">Please respond to<br> darren.edgerton</font></div></td></tr> </table> </ul> </ul> </ul> </ul> </td><td width=3D"60%"> <table width=3D"100%" border=3D"0" cellspacing=3D"0" cellpadding=3D"0">= <tr valign=3D"top"><td width=3D"1%" valign=3D"middle"><img src=3D"cid:3= 0__=3D88BBE513DFFE4BB38f9e8a93df938@us.ibm.com" border=3D"0" height=3D"= 1" width=3D"58" alt=3D""><br> <div align=3D"right"><font size=3D"2">To</font></div></td><td width=3D"= 100%"><img src=3D"cid:30__=3D88BBE513DFFE4BB38f9e8a93df938@us.ibm.com" = border=3D"0" height=3D"1" width=3D"1" alt=3D""><br> <font size=3D"2">informix-list@iiug.org</font></td></tr> <tr valign=3D"top"><td width=3D"1%" valign=3D"middle"><img src=3D"cid:3= 0__=3D88BBE513DFFE4BB38f9e8a93df938@us.ibm.com" border=3D"0" height=3D"= 1" width=3D"58" alt=3D""><br> <div align=3D"right"><font size=3D"2">cc</font></div></td><td width=3D"= 100%"><img src=3D"cid:30__=3D88BBE513DFFE4BB38f9e8a93df938@us.ibm.com" = border=3D"0" height=3D"1" width=3D"1" alt=3D""><br> </td></tr> <tr valign=3D"top"><td width=3D"1%" valign=3D"middle"><img src=3D"cid:3= 0__=3D88BBE513DFFE4BB38f9e8a93df938@us.ibm.com" border=3D"0" height=3D"= 1" width=3D"58" alt=3D""><br> <div align=3D"right"><font size=3D"2">Subject</font></div></td><td widt= h=3D"100%"><img src=3D"cid:30__=3D88BBE513DFFE4BB38f9e8a93df938@us.ibm.= com" border=3D"0" height=3D"1" width=3D"1" alt=3D""><br> <font size=3D"2">how do you convert from hex to integer using SQL ?</fo= nt></td></tr> </table> <table border=3D"0" cellspacing=3D"0" cellpadding=3D"0"> <tr valign=3D"top"><td width=3D"58"><img src=3D"cid:30__=3D88BBE513DFFE= 4BB38f9e8a93df938@us.ibm.com" border=3D"0" height=3D"1" width=3D"1" alt= =3D""></td><td width=3D"336"><img src=3D"cid:30__=3D88BBE513DFFE4BB38f9= e8a93df938@us.ibm.com" border=3D"0" height=3D"1" width=3D"1" alt=3D""><= /td></tr> </table> </td></tr> </table> <br> <tt>Hi,<br> <br> i need to conv from Hex to Integer<br> <br> can this be done using SQL with Informix ??<br> ie<br> select integer(hex_data_column) from mytable<br> <br> thanks,<br> DSE<br> <br> </tt><br> </body></html>= --1__=88BBE513DFFE4BB38f9e8a93df938690918c88BBE513DFFE4BB3-- --0__=88BBE513DFFE4BB38f9e8a93df938690918c88BBE513DFFE4BB3 Content-type: image/gif; name="graycol.gif" Content-Disposition: inline; filename="graycol.gif" Content-ID: <10__=88BBE513DFFE4BB38f9e8a93df938@us.ibm.com> Content-transfer-encoding: base64 R0lGO