‎11-01-2016 09:53 PM
Select Top 1000000 tblAssets.AssetID,
tblAssets.AssetUnique,
tsysOS.Image As icon,
tblAssets.Domain,
tsysOS.OSname,
tblAssets.Memory,
Cast(Cast(Cast(tblDiskdrives.Size As bigint) / 1024 / 1024 / 1024 As
numeric) As nvarchar) As [Disk size],
tblAssets.NrProcessors As #CPU,
tblAssets.Processor,
tblAssetCustom.Model,
tblAssetCustom.Manufacturer,
tblAssetCustom.Serialnumber As Serial,
tblAssets.Username As [User],
tblADusers.Username,
tblADObjects.sAMAccountName As Manager,
tblAssets.IPAddress As [IP Address],
tsysIPLocations.IPLocation,
tblAssets.Mac,
tblAssets.Firstseen,
tblAssets.Lastseen,
tblAssets.Lasttried,
tblAssetCustom.PurchaseDate,
tblAssetCustom.Warrantydate
From tblAssets
Inner Join tblDiskdrives On tblAssets.AssetID = tblDiskdrives.AssetID
Left Outer Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join tsysOS On tblAssets.OScode = tsysOS.OScode
Left Join tsysIPLocations On tsysIPLocations.LocationID = tblAssets.LocationID
And tsysIPLocations.StartIP <= tblAssets.IPNumeric And
tsysIPLocations.EndIP >= tblAssets.IPNumeric,
tblADObjects
Right Join tblADusers On tblADObjects.ADObjectID = tblADusers.ADObjectID And
tblADObjects.ADObjectID = tblADusers.ManagerADObjectId
Where tblDiskdrives.Caption = 'c:' And tblAssetCustom.State = 1
Order By tblAssets.AssetID
Solved! Go to Solution.
‎11-02-2016 09:28 PM
Select Top 1000000 tblAssets.AssetID,
tblAssets.AssetUnique,
tsysOS.Image As icon,
tblAssets.Domain,
tsysOS.OSname,
tblAssets.Memory,
Cast(Cast(Cast(tblDiskdrives.Size As bigint) / 1024 / 1024 / 1024 As
numeric) As nvarchar) As [Disk size],
tblAssets.NrProcessors As #CPU,
tblAssets.Processor,
tblAssetCustom.Model,
tblAssetCustom.Manufacturer,
tblAssetCustom.Serialnumber As Serial,
tblAssets.Username As [User],
adu.Username As [Manager],
tblAssets.IPAddress As [IP Address],
tsysIPLocations.IPLocation,
tblAssets.Mac,
tblAssets.Firstseen,
tblAssets.Lastseen,
tblAssets.Lasttried,
tblAssetCustom.PurchaseDate,
tblAssetCustom.Warrantydate
From tblAssets
Inner Join tblDiskdrives On tblAssets.AssetID = tblDiskdrives.AssetID
Left Outer Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join tsysOS On tblAssets.OScode = tsysOS.OScode
Left Join tsysIPLocations On tsysIPLocations.LocationID = tblAssets.LocationID
And tsysIPLocations.StartIP <= tblAssets.IPNumeric And
tsysIPLocations.EndIP >= tblAssets.IPNumeric
Left Join tblADUsers on tblADUsers.Userdomain = tblAssets.Userdomain AND tblADUsers.Username = tblAssets.Username
Left Join tblADUsers adu on adu.ADObjectID = tblADUsers.ManagerADObjectId
Where tblDiskdrives.Caption = 'c:' And tblAssetCustom.State = 1
Order By tblAssets.AssetID
‎11-04-2016 06:37 PM
‎11-02-2016 09:34 PM
‎11-02-2016 09:28 PM
Select Top 1000000 tblAssets.AssetID,
tblAssets.AssetUnique,
tsysOS.Image As icon,
tblAssets.Domain,
tsysOS.OSname,
tblAssets.Memory,
Cast(Cast(Cast(tblDiskdrives.Size As bigint) / 1024 / 1024 / 1024 As
numeric) As nvarchar) As [Disk size],
tblAssets.NrProcessors As #CPU,
tblAssets.Processor,
tblAssetCustom.Model,
tblAssetCustom.Manufacturer,
tblAssetCustom.Serialnumber As Serial,
tblAssets.Username As [User],
adu.Username As [Manager],
tblAssets.IPAddress As [IP Address],
tsysIPLocations.IPLocation,
tblAssets.Mac,
tblAssets.Firstseen,
tblAssets.Lastseen,
tblAssets.Lasttried,
tblAssetCustom.PurchaseDate,
tblAssetCustom.Warrantydate
From tblAssets
Inner Join tblDiskdrives On tblAssets.AssetID = tblDiskdrives.AssetID
Left Outer Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join tsysOS On tblAssets.OScode = tsysOS.OScode
Left Join tsysIPLocations On tsysIPLocations.LocationID = tblAssets.LocationID
And tsysIPLocations.StartIP <= tblAssets.IPNumeric And
tsysIPLocations.EndIP >= tblAssets.IPNumeric
Left Join tblADUsers on tblADUsers.Userdomain = tblAssets.Userdomain AND tblADUsers.Username = tblAssets.Username
Left Join tblADUsers adu on adu.ADObjectID = tblADUsers.ManagerADObjectId
Where tblDiskdrives.Caption = 'c:' And tblAssetCustom.State = 1
Order By tblAssets.AssetID
Experience Lansweeper with your own data. Sign up now for a 14-day free trial.
Try Now