Change BitInt Format to IP Format of ISA Log

 Query
select
  cast(convert(int,substring(cast(clientip as varbinary(4)),1,1)) as varchar(3)) IP1,
  cast(convert(int,substring(cast(clientip as varbinary(4)),2,1)) as varchar(3)) IP2,
  cast(convert(int,substring(cast(clientip as varbinary(4)),3,1)) as varchar(3)) IP3,
  cast(convert(int,substring(cast(clientip as varbinary(4)),4,1)) as varchar(3)) IP4,
  ClientIP
from ISALOG_20081214_WEB_000..WebProxyLog where not clientusername = 'anonymous' order by logtime

Result
IP1 IP2 IP3 IP4 ClientIP
10 10 20 6 168432646
10 10 20 140 168432780
10 10 20 137 168432777

Comments

Popular posts from this blog

การตั้งเวลาระหว่าง Server และ Client

วิธีตั้งค่า NTP บน Primary Domain Controller

Installation and Run Node.JS on IIS