cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
jperryman
Engaged Sweeper II
Hello all.
Is there a way to get a report that will list all devices within a certain range using wildcards for the 2nd and 4th octet of an IP4 address?
For example:
10.*.1.*
where the asterisks are wildcards

I have little to no sql experience.
Thanks in advance.
2 REPLIES 2
jperryman
Engaged Sweeper II
Thanks! Much appreciated!
mateusz
Engaged Sweeper II
Select Top 1000000 tsysOS.Image As icon,
tblAssets.AssetID,
tblAssets.AssetName,
tblAssets.IPAddress,
tblAssets.Domain,
tblAssets.Username,
tblAssets.Userdomain,
tblAssets.Description,
tblAssetCustom.Manufacturer,
tblAssetCustom.Model,
tblAssetCustom.Location,
tsysIPLocations.IPLocation,
tsysOS.OSname As OS,
tblAssets.SP As SP,
tblAssets.Firstseen,
tblAssets.Lastseen
From tblAssets
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join tsysOS On tblAssets.OScode = tsysOS.OScode
Left Join tsysIPLocations On tblAssets.IPNumeric >= tsysIPLocations.StartIP
And tblAssets.IPNumeric <= tsysIPLocations.EndIP
Where tblAssets.IPAddress Like '10.%.1.%'
Order By tblAssets.IPNumeric