Custom HTML Query not working

The only module we have is NPM, running 2020.2 HF 1

This code: 
n.caption as Node
, n.DetailsUrl AS [_LinkFor_Node]
, '/Orion/images/StatusIcons/Small-' + n.StatusLED AS [_IconFor_Node]
, n.customproperties.system
, n.Contact
, n.location
FROM Orion.Nodes n
left join Orion.ContainerMembers c on c.MemberPrimaryID = n.NodeID
where c.MemberPrimaryID is NULL

... should return the Node Caption of any Node that is NOT a member of ANY groups.  However I keep getting the error: 

Msg 208, Level 16, State 1, Line 1
Invalid object name 'Orion.Nodes'.

...does anyone have an idea why?  (This was done with the SWSQL tool, not with MSSQL Query)

  • That looks perfectly valid, to be sure when you say SWSQL tool you mean swql Studio right? Not the solarwind database manager.
  • The query looks good  if you have custom property system defined in line , n.CustomProperties.system. Otherwise you'd get the error mentioned in your post. I'd suggest to instal SWQL Studio and test the query on the. When you type dot next to , n.CustomProperties then you will get the list of available options.

  • There are only two products I am using and I need to make sure I'm talking about the same things you are.

    I have tried this query in the microsoft management client called SQL Server Management Studio for MSSQL Server 2019.  It provides the error I listed above.

    I have tried this query in the database query tool provided by Solarwinds in the start menu.  It provides the error I listed above.

    Since the database query tool provided by Solarwinds doesn't provide query assistance lets say I'm running the first product, SQL Server Management Studio for MSSQL Server 2019..

    At no point during typing the query do I get an option for multiple custom properties after I type a period for an object. It looks like this:


  • The query you shown is in SWQL - not MSSQL. So that is the reason you got the error message while running in SQL Studio or Database Manager. Table you should refere in MSSQL have different names (dbname.dbo.NodesData - not Orion.Nodes etc.). Then I'd suggest to test your query in SWQL Studio, especially you are refering to path on Orion Server ('/Orion/images/StatusIcons/Small-'). Your query is correct in SWQL (SolarWinds Query Language). So download SolarWinds Orion SDK stuff from and install SWQL Studio on Orion server to build and test your query. 

    Another way to test your query is to build new table widget in Modern Dashboard and test SWQL query there.

  • Thank you, I didn't even know this other query tool existed.  I've installed it and am using it now.