I have the following query for finding Monitors 'used by' users, but I ran into one hiccup. I also need to be able to see the monitors that
don't have the 'used by' relation set as well.
Select Top 1000000 tblAssets.AssetID,
tblAssets.AssetName,
Convert(nvarchar(10),tblAssetCustom.PurchaseDate,120) As [Purchase Date],
tblAssetCustom.Custom3 As Qty,
Convert(integer,tblAssetCustom.Custom1) As [Purchase Price],
tblAssetCustom.Manufacturer,
tblAssetCustom.Model,
tblAssetCustom.Serialnumber,
Convert(nvarchar(10),tblAssetCustom.Lastchanged,120) As [Date Saved],
tblAssetUserRelations.Username
From tblAssets
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join tsysAssetTypes On tsysAssetTypes.AssetType = tblAssets.Assettype
Inner Join tblAssetUserRelations On tblAssets.AssetID =
tblAssetUserRelations.AssetID
Where tsysAssetTypes.AssetType = 208
Order By [Purchase Date],
[Purchase Price]