1. 把IP变成数字的函数实例
create function dbo.fn_IP(@ip varchar(40)) returns bigint begin return parsename(@ip,4)*cast(16777216 as bigint)+parsename(@ip,3)*65536+parsename(@ip,2)*256+parsename(@ip,1) end
1. 把IP变成数字的函数实例
create function dbo.fn_IP(@ip varchar(40)) returns bigint begin return parsename(@ip,4)*cast(16777216 as bigint)+parsename(@ip,3)*65536+parsename(@ip,2)*256+parsename(@ip,1) end