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

Moving data from rows to columns

Setting up several UnDP's to gather interface data. The poller config does not allow me to get all of the data from the top OID, so I have to create multiple pollers. The result is that all the data goes in a table that puts each poller output in a separate row, but all the data is under just one column. I need each poller's output to have a separate column so that I can join the data with the interfaces table.

SELECT AssignmentName, InterfaceID, Status
FROM Orion.NPM.CustomPollerStatusOnInterface

Returns this:

AssignmentName (poller)InterfaceIDStatus (polled values)
locIfInputQueueDrops on router1 Te 1/3856970
locIfInOverrun  on router1 Te 1/3856970
locIfReliab  on router1 Te 1/385697255
locIfOutputQueueDrops  on router1 Te 1/385697186


I need something like this:



I can join it to the Orion.NPM.Interfaces table easily enough, but then I have extra rows of duplicated data:

InterfaceInterfaceIDInterfaceID1Status1Speed%in Util%Out Util


How do I consolidate those rows into a single column and separate Status into separate columns?

0 Kudos
1 Reply