cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Clagnuts
Engaged Sweeper II
Hi I'm after some help if possible, I've been trying to create a report that displays all out of warranty servers based on their vlan, e.g

All ip's in Vlan 10.10.0.* or 10.20.0.*


the code I've tried is below, unfortunately it doesn't work, any help would be appreciated.

Select Top 1000000 tblAssetCustom.AssetID,
tblAssets.AssetUnique,
tsysOS.OSname,
tblAssetCustom.Model,
tblAssetCustom.Serialnumber As [Identifying Number],
tblAssetCustom.PurchaseDate As [Purchase Date],
tblAssetCustom.Warrantydate As [Warranty Expiration],
tsysOS.Image As icon,
tblAssets.IPAddress As [IP Address]
From tblAssetCustom
Inner Join tblAssets On tblAssetCustom.AssetID = tblAssets.AssetID
Inner Join tblComputersystem On tblAssets.AssetID = tblComputersystem.AssetID
Inner Join tsysOS On tblAssets.OScode = tsysOS.OScode
Where tblAssetCustom.Warrantydate < GetDate() And tblAssets.IPAddress =
'Like ''10.10.0.%''' And tblComputersystem.Domainrole > 1 And
tblAssetCustom.State = 1
Order By [Warranty Expiration] Desc,
[IP Address] Desc
1 ACCEPTED SOLUTION
Clagnuts
Engaged Sweeper II
Sorted it, Here the code for anyone else.

Select Top 1000000 tblAssetCustom.AssetID,
tblAssets.AssetUnique,
tsysOS.OSname,
tblAssetCustom.Model,
tblAssetCustom.Serialnumber As [Identifying Number],
tblAssetCustom.PurchaseDate As [Purchase Date],
tblAssetCustom.Warrantydate As [Warranty Expiration],
tsysOS.Image As icon,
tblAssets.IPAddress As [IP Address]
From tblAssetCustom
Inner Join tblAssets On tblAssetCustom.AssetID = tblAssets.AssetID
Inner Join tblComputersystem On tblAssets.AssetID = tblComputersystem.AssetID
Inner Join tsysOS On tblAssets.OScode = tsysOS.OScode
Inner Join tblADComputers On tblAssets.AssetID = tblADComputers.AssetID
Where tblAssetCustom.Warrantydate < GetDate() And
tblAssets.IPAddress Like '10.32.0.%' And tblComputersystem.Domainrole > 1 And
tblAssetCustom.State = 1
Order By [Warranty Expiration] Desc,
[IP Address] Desc

View solution in original post

1 REPLY 1
Clagnuts
Engaged Sweeper II
Sorted it, Here the code for anyone else.

Select Top 1000000 tblAssetCustom.AssetID,
tblAssets.AssetUnique,
tsysOS.OSname,
tblAssetCustom.Model,
tblAssetCustom.Serialnumber As [Identifying Number],
tblAssetCustom.PurchaseDate As [Purchase Date],
tblAssetCustom.Warrantydate As [Warranty Expiration],
tsysOS.Image As icon,
tblAssets.IPAddress As [IP Address]
From tblAssetCustom
Inner Join tblAssets On tblAssetCustom.AssetID = tblAssets.AssetID
Inner Join tblComputersystem On tblAssets.AssetID = tblComputersystem.AssetID
Inner Join tsysOS On tblAssets.OScode = tsysOS.OScode
Inner Join tblADComputers On tblAssets.AssetID = tblADComputers.AssetID
Where tblAssetCustom.Warrantydate < GetDate() And
tblAssets.IPAddress Like '10.32.0.%' And tblComputersystem.Domainrole > 1 And
tblAssetCustom.State = 1
Order By [Warranty Expiration] Desc,
[IP Address] Desc