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

Re: Need SQL Help for UnDP reporting

$
0
0

I tried using a PIVOT Operator but still no GO.


SELECTCaption,[iveVPNTunnels]ASVPNTunnels,[JuniperIVEDiskUtil]ASDiskUtilization,[productVersion]ASProductVersion,[iveSSLConnections]ASSSLConnections,[JuniperIVEMemoryUtil]ASMemUtilization,[JuniperIVEVPNUsers]ASVPNUsers,[productName]ASProductName,[iveConcurrentUsers]ASConcurrentUsers,[JuniperIVECpuUtil]ASCPUUtilization

FROM

   (

SELECTn.caption,n.IP_Address,cpa.assignmentName,cp.UniqueName,cps.statusAS

FROMCustomPollerAssignmentcpa

INNERJOINNodesn

ONcpa.NodeID=n.NodeID

INNERJOINCustomPollerscp

ONcp.CustomPollerID=cpa.CustomPollerID

INNERJOINCustomPollerStatuscps

ONcps.CustomPollerAssignmentID=cpa.CustomPollerAssignmentID

 

WHEREtag='junos'

   )ASsrc

   (

Status

FOR

UniquenameIN

([iveVPNTunnels],[JuniperIVEDiskUtil],[productVersion],[iveSSLConnections],[JuniperIVEMemoryUtil],[JuniperIVEVPNUsers],[productName],[iveConcurrentUsers],[JuniperIVECpuUtil])

   )ASpvt;

*********************************************************************************************************************************************************************************

Msg 156, Level 15, State 1, Line 6

Incorrect syntax near the keyword 'FROM'.

 

I think this could be becase Status is a function in MS SQL.  Any DBA's out there who knows a workaround to have the query read as Status the column nme and not as the function

 

Thanx


Viewing all articles
Browse latest Browse all 20019

Trending Articles