This is not working for me. I just get the first octet.

(The concat function is also not supported?)

Thanks
dbikash


Igor Tandetnik wrote:
> 
> Jonathon <[EMAIL PROTECTED]> wrote:
>> I was just curious if there is a way to convert an integer
>> representation of an IP address that I store in my DB, to it's string
>> equivalent (xxx.xxx.xxx.xxx)?  I would also need to convert it to
>> host-byte order as well.
> 
> select (ip >> 24) || '.' || ((ip >> 16) & 255) || '.' || ((ip >> 8) & 
> 255) || '.' || (ip & 255)
> from mytable;
> 
> Igor Tandetnik 
> 
> 
> 
> _______________________________________________
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Convert-integer-IP-address-to-string-IP-address-in-Sqlite-tp20267362p20299412.html
Sent from the SQLite mailing list archive at Nabble.com.

_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to