nhess80
Yak Posting Veteran
83 Posts |
Posted - 2014-08-28 : 14:08:36
|
Currently the sql statement I have below will return these resultsSysName | Port | TxRx | PowerHenning - VZW, 1, Tx, -2.97Henning - VZW, 1, Rx, -13.93Henning - VZW, 2, Tx, -4.99Henning - VZW, 2, Rx, -5.72But I am trying to get it to return the results like this and cannot figure out howHenning - VZW, 1, TX -2.9, RX -13.93Henning - VZW, 2, TX -4.99, RX -5.72Any help would be great..Thanks, NickSELECT SysName, RowID AS Port,c.UniqueName AS TxRx, ROUND( LOG10(RawStatus /10000) * 10, 2 ) AS PowerFROM [SolarWindsOrion].[dbo].[CustomPollerStatus] dRIGHT JOIN(SELECT b.NodeID,b.SysName,b.CustomPollerID,b.CustomPollerAssignmentID,UniqueNameFROM [SolarWindsOrion].[dbo].[CustomPollers] cRIGHT JOIN(SELECT a.NodeID,a.SysName,CustomPollerID,CustomPollerAssignmentIDFROM [SolarWindsOrion].[dbo].[CustomPollerAssignment] bRIGHT JOIN(SELECT NodeID,SysNameFROM [SolarWindsOrion].[dbo].[Nodes] aWhere Vendor = 'Accedian') aON a.NodeID = b.NodeIDWhere b.CustomPollerID IN ('CA5B0D5F-DAB6-4DC4-8F78-58715DF05F7A','C7F914E5-C590-4CE0-91DE-145EC826CD6D')) bON c.CustomPollerID = b.CustomPollerID) cON d.CustomPollerAssignmentID = c.CustomPollerAssignmentIDWhere RawStatus <> '0' AND NodeID = '13'Group by c.NodeID,c.SysName,c.CustomPollerID,c.CustomPollerAssignmentID,c.UniqueName,RawStatus,RowIDOrder by SysName, RowID,UniqueName DESC,RawStatus |
|