Quantcast
Channel: THWACK: Message List
Viewing all articles
Browse latest Browse all 20019

Re: SQL help with Report Writer

$
0
0

I agree with bluefunelemental:  It MAY have to do with the nested select statement. I guess I would have gone for a more linear SQL. I also like ot explicitly call out the table name just in case:

 

SELECT Nodes.NodeID, Nodes.Caption AS Node_Name, Nodes.IP_Address, Nodes.Modal, Nodes.Vendor, Nodes.MachineType, Nodes.Description, Nodes.IOSVersion,

(CASE

WHEN Nodes.EntityType = 'Orion.Nodes' THEN 'Physical Machine'

WHEN Nodes.EntityType = 'Orion.VirtualMachine' THEN 'Virtual Machine'

WHEN Nodes.EntityType = 'Orion.VIM.Hosts' THEN 'Virtual Host'

WHEN Nodes.EntityType = 'Orion.VIM.VCenters' THEN 'vCenter'

ELSE 'Unknown'

END) AS EntityType

FROM

Nodes

WHERE Nodes.Device_Type = 'SERVER'

AND Nodes.EntityType = 'Orion.Nodes'

AND Nodes.MachineType <> 'unknown'


Viewing all articles
Browse latest Browse all 20019

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>