• i have always converted IP's to big ints so that i could do cmparison and ranges;

    something like this in your table setup can help:

    DECLARE @IPInfo TABLE

    (

    MachineId int NOT NULL,

    IPAddress varchar ( 255 ) NOT NULL,

    IPAsBigInteger AS convert(bigint,parsename(IPAddress,4)) * 256 * 256 * 256 +

    convert(bigint,parsename(IPAddress,3)) * 256 * 256 +

    convert(bigint,parsename(IPAddress,2)) * 256 +

    convert(bigint,parsename(IPAddress,1))

    );

    then you can test if the value is between 10.0.0.1 (bigint =167772161 and 10.255.255.255(bigint = 184549375) ?(is that right? outta practice with networking and subnets)

    declare @ipAddress varchar(20)

    SET @ipAddress='10.255.255.255'

    SELECT

    convert(bigint,parsename(@ipAddress,4)) * 256 * 256 * 256 +

    convert(bigint,parsename(@ipAddress,3)) * 256 * 256 +

    convert(bigint,parsename(@ipAddress,2)) * 256 +

    convert(bigint,parsename(@ipAddress,1))

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!