Quantcast
Channel: THWACK: Popular Discussions - Orion SDK
Viewing all articles
Browse latest Browse all 3719

SWQL Query returning NULL results

$
0
0

Hi,

 

I'm after some guidance, I'm building a SWQL query to return the Status of UPS's from a Custom Poller and I'm getting duplicate rows returned with the additional rows containing a NULL value and I can't work out where it is coming from.

 

The query is.

 

select distinct n.caption as [UPS]

 

,case

when cpa.CustomPollerName = 'Manufacturer' and cpa.CurrentValue is not null then cpa.currentvalue

end as [Manufacturer]

 

FROM Orion.NPM.CustomPollerAssignment cpa

 

join Orion.NPM.CustomPollers cp on cp.CustomPollerID=cpa.CustomPollerID

left join Orion.Nodes n on n.nodeid=cpa.nodeid

 

where cp.groupname = 'Eaton UPS'

 

 

And the results show as

 

BBY01PPUPS01.corp.int                NULL

BBY01PPUPS01.corp.int                EATON

KBI01PPUPS01.corp.int                 NULL

KBI01PPUPS01.corp.int                 EATON

KPS34PPUPS01                            NULL

KPS34PPUPS01                            Eaton

KPS37PPUPS01.corp.int               NULL

KPS37PPUPS01.corp.int               EATON

KPSWarehouseUPS                       NULL

KPSWarehouseUPS                       Eaton

MPS01CQUPS01.corp.int              NULL

MPS01CQUPS01.corp.int              Powerware Corporation

MPS01CQUPS02.corp.int              NULL

MPS01CQUPS02.corp.int              Powerware Corporation

MPS01CQUPS03.corp.int              NULL

MPS01CQUPS03.corp.int              Powerware Corporation

MPS01CQUPS05.corp.int              NULL

MPS01CQUPS05.corp.int              Powerware Corporation

MPS01CSPUPS01.corp.int            NULL

MPS01CSPUPS01.corp.int            Eaton

MUN01PPUPS01.corp.int              NULL

MUN01PPUPS01.corp.int              Eaton

PJR01PPUPS01.corp.int               NULL

PJR01PPUPS01.corp.int               Eaton Corporation

 

Thanks

 

Craig Boyce


Viewing all articles
Browse latest Browse all 3719

Trending Articles



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