cancel
Showing results for 
Search instead for 
Did you mean: 
Create Post
Level 9

SWQL, EOC and Select commands

Jump to solution

Since we have the EOC2.2, we  are trying to convert some custom reports that we did in MS Reporting server to SWQL. We learned a few things.

Custom properties do not appear in the nodes view when using the swql studio however that info does appear in Orion.NodesCustomProperties.

So there are two things I am stuck on. However this post will cover the first one.

select

    n.Caption,

    n.Description,

    n.Location,

    n.MachineType,

    n.Status,

    p.City,

    p.AssetTag,

    p.Device_Function,

    p.SerialNumber,

    p.Network_Zone,

    p.Number_of_Physical_Devices,

  TotalResourceUnit = 1,

   i.ObjectSubType,

   p.Resource_Unit_Name

From Orion.Nodes n

inner JOIN Orion.NodesCustomProperties p on p.NodeID = n.NodeID

inner JOIN Orion.NPM.Interfaces i on i.NodeID = n.NodeID

This query fails!

If I take:

  TotalResourceUnit = 1,

out of the query it works.

I realize SWQL is a readonly language.  I also realize  that   TotalResourceUnit = 1, is creating for a lack of a better term a column.  I need that column or the rest of the query for the report wont work.

How can I make this TotalResourceUnit = 1 work?

Thank you in advance!

0 Kudos
1 Solution

The query probably needs to look like this:

SELECT

    n.Caption,

    n.Description,

    n.Location,

    n.MachineType,

    n.Status,

    p.City,

    p.AssetTag,

    p.Device_Function,

    p.SerialNumber,

    p.Network_Zone,

    p.Number_of_Physical_Devices,

    '1' AS [TotalResourceUnit],

    i.ObjectSubType

    p.Resource_Unit_Name

FROM Orion.Nodes n

INNER JOIN Orion.NodesCustomProperties p ON p.NodeID = n.NodeID

INNER JOIN Orion.NPM.Interfaces i ON i.NodeID = n.NodeID

- David Smith

View solution in original post

3 Replies

The query probably needs to look like this:

SELECT

    n.Caption,

    n.Description,

    n.Location,

    n.MachineType,

    n.Status,

    p.City,

    p.AssetTag,

    p.Device_Function,

    p.SerialNumber,

    p.Network_Zone,

    p.Number_of_Physical_Devices,

    '1' AS [TotalResourceUnit],

    i.ObjectSubType

    p.Resource_Unit_Name

FROM Orion.Nodes n

INNER JOIN Orion.NodesCustomProperties p ON p.NodeID = n.NodeID

INNER JOIN Orion.NPM.Interfaces i ON i.NodeID = n.NodeID

- David Smith

View solution in original post

That did the trick Thank you

Product Manager
Product Manager

Ill take a look and get back to you tmcurry