Home Asset Management

Asset SQL query

Jeffrey_RutkowskiJeffrey_Rutkowski Customer Adept IT Monkey ✭✭
Hi Cireson Community

We are doing some reporting in regards to our assets however the out of the box reporting doesn't seem to satisfy our requirements.

What we would like to do is find the related hardware asset of a hardware asset.
For example a SIM Card hardware asset which is directly linked/related to a Mobile Phone hardware asset. 
(If you open a Hardware Asset and look in the Related Assets tab - you will notice an are which displays "Hardware Assets this Hardware Asset belongs to"

Does anyone know of a SQL query which would identify the related asset of a hardware asset?

Answers

  • Geoff_RossGeoff_Ross Cireson Consultant O.G.
    Hi Jeffrey,

    This query is joining with the relationship table and then back to HWA table to bring back these relationships.

    Hope this can get you started with your reporting. NB: This runs against ServiceManager DB.

    SELECT HWA.Name_8B938849_A621_7754_D33B_BD8E54DC10B4 as [Hardware Asset],
           HWAR.Name_8B938849_A621_7754_D33B_BD8E54DC10B4 as [Belongs To]
    FROM MT_Cireson$AssetManagement$HardwareAsset HWA
    JOIN Relationship R
    ON HWA.BaseManagedEntityId = R.TargetEntityId
    JOIN MT_Cireson$AssetManagement$HardwareAsset HWAR
    ON R.SourceEntityId = HWAR.BaseManagedEntityId

    Geoff
Sign In or Register to comment.