I'll like to ask if DB2 have any in-built functions equivalent to mysql inet_aton, inet_ntoa?
Or is there any equivalent for ip2long or long2ip?
NOTICE: developerWorks Community will be offline May 29-30, 2015 while we upgrade to the latest version of IBM Connections. For more information, read our upgrade FAQ.
This topic has been locked.
6 replies Latest Post - 2013-01-15T07:44:37Z by SystemAdmin
Pinned topic DB2 have any equivalent mysql inet_aton, inet_ntoa functions?
Answered question This question has been answered.
Unanswered question This question has not been answered yet.
Updated on 2013-01-15T07:44:37Z at 2013-01-15T07:44:37Z by SystemAdmin
Re: DB2 have any equivalent mysql inet_aton, inet_ntoa functions?2013-01-14T07:49:20Z in response to SystemAdminHi,
I am considering storing ip address as numbers instead of varchar into DB2.
Based on mysql functions inet_aton, inet_nota:
mysql> SELECT INET_NTOA(167773449);
mysql> SELECT INET_ATON('10.0.5.9');
Does DB2 have similar in-built functions as above?
Re: DB2 have any equivalent mysql inet_aton, inet_ntoa functions?2013-01-14T13:11:36Z in response to SystemAdminI have created a sample implementation for these functions in DB2 in my blog.
Please check and let me know if it's what you are looking for.