‎11-04-2013 05:03 PM
Solved! Go to Solution.
‎11-04-2013 08:05 PM
WHERE
(tblPrintershist.Portname = 'USB001' And tblAssetCustom.State = 1)
Or (tblPrintershist.Portname = 'LPT1:')
Or (tblPrintershist.Portname = 'USB002')
Or (tblPrintershist.Portname = 'USB003')
Or (tblPrintershist.Portname = 'LPT2:')
(Asset is active and printer port is USB001:)
OR (don't care about asset state and printer port is LPT1:)
OR (don't care about asset state and printer port is LPT2:)
etc.
(Asset is active)
AND ( printer port is USB001:
OR printer port is LPT1:
OR printer port is LPT2:
etc.
)
tblAssetCustom.State = 1
AND ( tblPrinters.Portname LIKE 'USB%'
OR tblPrinters.Portname LIKE 'LPT%'
OR tblPrinters.Portname LIKE 'COM%'
)
‎11-13-2013 01:02 PM
‎11-12-2013 10:43 PM
Select Top 1000000
tblAssets.Username,
tblPrinters.Caption As Caption1,
tblAssetCustom.Location As Location1,
tblAssetCustom.Comments,
tblAssets.AssetID,
tblAssets.AssetName,
tsysAssetTypes.AssetTypeIcon10 As icon,
tblAssets.IPAddress,
tblAssetCustom.Custom1 As [Print Manager],
CASE
WHEN Exists (SELECT Top 1
tblSoftware.AssetID
FROM
tblSoftware
INNER JOIN tblSoftwareUni ON tblSoftwareUni.SoftID = tblSoftware.SoftID
WHERE
tblSoftware.AssetID = tblAssets.AssetID
AND tblSoftwareUni.SoftwareName = 'Print Manager Plus')
THEN 'Yes'
ELSE 'No'
END AS PMPinstalled
From
tblAssets
...
‎11-12-2013 09:13 PM
‎11-12-2013 08:57 PM
CASE
WHEN Exists (SELECT Top 1
tblSoftware.AssetID
FROM
tblSoftware
INNER JOIN tblSoftwareUni ON tblSoftwareUni.SoftID = tblSoftware.SoftID
WHERE
tblSoftware.AssetID = tblAssets.AssetID
AND tblSoftwareUni.SoftwareName = 'Print Manager Plus')
THEN 'Yes'
ELSE 'No'
END AS PMPinstalled
‎11-12-2013 08:17 PM
‎11-08-2013 05:18 PM
Select Top 1000000 tsysAssetTypes.AssetTypeIcon10 As icon,
tblAssets.AssetID,
tblAssets.AssetName,
tblAssets.Domain,
tblAssets.IPAddress,
tblAssets.Username,
tblAssets.Userdomain,
tblAssetCustom.Location,
tblAssetCustom.Comments,
tblAssets.Firstseen,
tblAssets.Lastseen,
tblPrinters.Caption,
tblPrinters.Portname
From tblAssets
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join tsysAssetTypes On tsysAssetTypes.AssetType = tblAssets.Assettype
Inner Join tblPrinters On tblAssets.AssetID = tblPrinters.AssetID
Where ((tblPrinters.Portname Like 'USB%' Or tblPrinters.Portname Like 'LPT%' Or
tblPrinters.Portname Like 'COM%') And tblAssetCustom.State = 1) Or
(tblPrinters.Portname Like '%.%.%.%' And tblAssetCustom.State = 1)
Order By tblAssets.Username
‎11-05-2013 07:38 PM
‎11-05-2013 07:27 PM
‎11-05-2013 02:48 PM
Experience Lansweeper with your own data. Sign up now for a 14-day free trial.
Try Now