[prev in list] [next in list] [prev in thread] [next in thread]
List: sqlite-users
Subject: Re: [sqlite] Convert integer IP address to string IP address in
From: "Igor Tandetnik" <itandetnik () mvps ! org>
Date: 2008-10-31 15:02:06
Message-ID: gef6lj$cmd$1 () ger ! gmane ! org
[Download RAW message or body]
Jonathon <thejunkjon@gmail.com> 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
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic