‎01-02-2019 03:49 PM
Select Top 1000000 t1.IprangeID As [1 Range ID],
t1.Servername As [1 Scanning server],
t1.Ipstart As [1 Start],
t1.Ipend As [1 End],
'<----->' As [=],
t2.IprangeID As [2 Range ID],
t2.servername As [2 Scanning server],
t2.Ipstart As [2 Start],
t2.Ipend As [2 End]
From tsysIPScanRanges t1
Inner Join (Select t2.IprangeID,
t2.Ipstart,
t2.Ipend,
t2.Servername As servername,
Convert(numeric(18),ParseName(t2.Ipstart, 4) + Right('000' +
IsNull(ParseName(t2.Ipstart, 3), ''), 3) + Right('000' +
IsNull(ParseName(t2.Ipstart, 2), ''), 3) + Right('000' +
IsNull(ParseName(t2.Ipstart, 1), ''), 3)) As istart2,
Convert(numeric(18),ParseName(t2.Ipend, 4) + Right('000' +
IsNull(ParseName(t2.Ipend, 3), ''), 3) + Right('000' +
IsNull(ParseName(t2.Ipend, 2), ''), 3) + Right('000' +
IsNull(ParseName(t2.Ipend, 1), ''), 3)) As iend2
From tsysIPScanRanges As t2
Where t2.Enabled = 1) As t2 On
(t2.istart2 >= Convert(numeric(18),ParseName(t1.Ipstart, 4) + Right('000' +
IsNull(ParseName(t1.Ipstart, 3), ''), 3) + Right('000' +
IsNull(ParseName(t1.Ipstart, 2), ''), 3) + Right('000' +
IsNull(ParseName(t1.Ipstart, 1), ''), 3)) And
t2.istart2 <= Convert(numeric(18),ParseName(t1.Ipend, 4) + Right('000' +
IsNull(ParseName(t1.Ipend, 3), ''), 3) + Right('000' +
IsNull(ParseName(t1.Ipend, 2), ''), 3) + Right('000' +
IsNull(ParseName(t1.Ipend, 1), ''), 3)) And t2.IprangeID <> t1.IprangeID)
Or
(t2.iend2 >= Convert(numeric(18),ParseName(t1.Ipstart, 4) + Right('000' +
IsNull(ParseName(t1.Ipstart, 3), ''), 3) + Right('000' +
IsNull(ParseName(t1.Ipstart, 2), ''), 3) + Right('000' +
IsNull(ParseName(t1.Ipstart, 1), ''), 3)) And
t2.iend2 <= Convert(numeric(18),ParseName(t1.Ipend, 4) + Right('000' +
IsNull(ParseName(t1.Ipend, 3), ''), 3) + Right('000' +
IsNull(ParseName(t1.Ipend, 2), ''), 3) + Right('000' +
IsNull(ParseName(t1.Ipend, 1), ''), 3)) And t2.IprangeID <> t1.IprangeID)
Where t1.Enabled = 1
‎05-16-2019 03:47 PM
‎05-15-2019 04:41 PM
Experience Lansweeper with your own data. Sign up now for a 14-day free trial.
Try Now