→ 🚀What's New? Join Us for the Fall Product Launch! Register Now !
‎11-25-2014 10:35 AM
SELECT
'/asset.aspx?assetid=' + Cast(d.y As NVARCHAR(1000)) As
[hyperlink_Asset A],
y.AssetName As [hyperlink_name_Asset A],
y.IpAddress [IP Address A],
'/asset.aspx?assetid=' + Cast(d.z As NVARCHAR(1000)) As
[hyperlink_Asset B],
z.AssetName As [hyperlink_name_Asset B],
y.IpAddress [IP Address B]
FROM
(
SELECT DISTINCT y.AssetID y, z.AssetID z FROM
(SELECT a.AssetID, AssetUnique, m.Mac, Serialnumber, Model FROM tblAssets a JOIN tblAssetCustom c ON a.AssetID = c.AssetID JOIN tblAssetMacAddress m ON a.AssetID = m.AssetID WHERE Assettype=-1) y
JOIN
(SELECT a.AssetID, AssetUnique, m.Mac, Serialnumber, Model FROM tblAssets a JOIN tblAssetCustom c ON a.AssetID = c.AssetID JOIN tblAssetMacAddress m ON a.AssetID = m.AssetID) z
ON y.AssetUnique <> z.AssetUnique AND y.Mac = z.Mac AND y.Serialnumber = z.Serialnumber AND y.Model = z.Model AND y.AssetID > z.AssetID
)d
JOIN tblAssets y ON d.y = y.AssetID
JOIN tblAssets z ON d.z = z.AssetID
‎04-01-2015 12:51 PM
‎04-03-2015 04:52 PM
laurentiune wrote:
I get this error: There was an error parsing the query. [ Token line number = 1,Token line offset = 178,Token in error = Select ]
Experience Lansweeper with your own data. Sign up now for a 14-day free trial.
Try Now