‎02-06-2013 06:18 PM
Select Distinct Top 1000000 co1.Computername,
co1.ComputerUnique,
co1.Username,
cs1.Manufacturer,
cs1.Model,
csp1.IdentifyingNumber As [Serial Number],
cpu.Name As [Processor Model],
cpu.MaxClockSpeed As [CPU (MHz)],
cs1.NumberOfProcessors As Cores,
os1.TotalVisibleMemorySize / 1024 As [Memory (MB)],
os1.Caption As [Operating System],
os1.CSDVersion As [Service Pack],
co1.LastknownIP As [IP Address],
co1.Lastseen As [Last Seen]
From upgrade_tblComputers co1
Left Outer Join upgrade_tblOperatingsystem os1 On co1.Computername =
os1.Computername
Left Outer Join upgrade_tblComputerSystemProduct csp1 On co1.Computername =
csp1.Computername
Left Outer Join upgrade_tblComputersystem cs1 On co1.Computername =
cs1.Computername
Left Outer Join upgrade_tblPROCESSOR cpu On co1.Computername =
cpu.Computername
Left Outer Join upgrade_tblDiskDrives dsk On co1.Computername =
dsk.Computername
Inner Join upgrade_tblNetwork
On co1.Computername = upgrade_tblNetwork.Computername
Where (dsk.Caption Like 'C:' And dsk.Description Like '%fixed disk%' And
upgrade_tblNetwork.DefaultIPGateway Like '172.18.49.254') Or
(upgrade_tblNetwork.DefaultIPGateway Like '172.18.49.254')
Solved! Go to Solution.
‎02-07-2013 07:56 PM
Select Top 1000000 tsysOS.Image As icon,
tblAssets.AssetID,
tblAssets.AssetName,
tblAssets.Domain,
tblAssets.Username,
tblAssets.Userdomain,
tblAssetCustom.Manufacturer,
tblAssetCustom.Model,
tblAssetCustom.Serialnumber,
tblProcessor.Name As [Processor Model],
tblProcessor.MaxClockSpeed As [CPU (MHz)],
tblAssets.NrProcessors As Cores,
tblAssets.Memory As [Memory (MB)],
tblOperatingsystem.Caption As [Operating System],
tblOperatingsystem.ServicePackMajorVersion As [Service Pack],
tblAssets.IPAddress As [IP Address],
tblAssets.Lastseen
From tblAssets
Inner Join tsysOS On tsysOS.OScode = tblAssets.OScode
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join tblProcessor On tblAssets.AssetID = tblProcessor.AssetID
Inner Join tblOperatingsystem On tblOperatingsystem.AssetID =
tblAssets.AssetID
Inner Join tblDiskdrives On tblAssets.AssetID = tblDiskdrives.AssetID
Inner Join tblNetwork On tblAssets.AssetID = tblNetwork.AssetID
Where (tblDiskdrives.Caption Like 'C:' And tblDiskdrives.Description Like '%fixed disk%' And tblNetwork.DefaultIPGateway Like '172.18.49.254') or (tblNetwork.DefaultIPGateway Like '172.18.49.254')
Order By tblAssets.AssetUnique
‎02-08-2013 02:15 PM
‎02-08-2013 01:50 PM
Order By tblAssets.AssetUnique
‎02-08-2013 11:58 AM
Select Distinct Top 1000000 tsysOS.Image As icon
‎02-08-2013 12:37 PM
Lansweeper wrote:
Could you add a Distinct to the Select statement to list unique lines only once.Select Distinct Top 1000000 tsysOS.Image As icon
‎02-08-2013 11:24 AM
‎02-07-2013 07:56 PM
Select Top 1000000 tsysOS.Image As icon,
tblAssets.AssetID,
tblAssets.AssetName,
tblAssets.Domain,
tblAssets.Username,
tblAssets.Userdomain,
tblAssetCustom.Manufacturer,
tblAssetCustom.Model,
tblAssetCustom.Serialnumber,
tblProcessor.Name As [Processor Model],
tblProcessor.MaxClockSpeed As [CPU (MHz)],
tblAssets.NrProcessors As Cores,
tblAssets.Memory As [Memory (MB)],
tblOperatingsystem.Caption As [Operating System],
tblOperatingsystem.ServicePackMajorVersion As [Service Pack],
tblAssets.IPAddress As [IP Address],
tblAssets.Lastseen
From tblAssets
Inner Join tsysOS On tsysOS.OScode = tblAssets.OScode
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join tblProcessor On tblAssets.AssetID = tblProcessor.AssetID
Inner Join tblOperatingsystem On tblOperatingsystem.AssetID =
tblAssets.AssetID
Inner Join tblDiskdrives On tblAssets.AssetID = tblDiskdrives.AssetID
Inner Join tblNetwork On tblAssets.AssetID = tblNetwork.AssetID
Where (tblDiskdrives.Caption Like 'C:' And tblDiskdrives.Description Like '%fixed disk%' And tblNetwork.DefaultIPGateway Like '172.18.49.254') or (tblNetwork.DefaultIPGateway Like '172.18.49.254')
Order By tblAssets.AssetUnique
Experience Lansweeper with your own data. Sign up now for a 14-day free trial.
Try Now