Hi all,
I'm completely unfamiliar with SWQL and to be honest I've never needed to use it until now.
We have this SQL query running a report
Select Distinct data.Name, sum(data.TotalPowerLoad) TotalPowerLoad, data.location
FROM (
SELECT
distinct (substring(n.Caption,1,16)) AS NAME, cs.ComponentStatisticData AS TotalPowerLoad, n.location
FROM
[dbo].[APM_CurrentStatistics] cs
INNER JOIN [dbo].[NodesData] n
ON n.NodeID = cs.NodeID
WHERE
ApplicationName = 'APC PDU' AND ComponentName LIKE '%LOAD (Amp)' AND n.caption LIKE 'City%'
Group By cs.nodeID,n.caption,cs.ComponentStatisticData, n.location) AS Data
Group by Data.Name, Data.Location
Order By Name ASC
I now need to run this query using the swispowershell module, unfortunately the swispowershell module seems to only support SWQL, in which this query is not compatible. So I need this SQL query "Converting" to SWQL.
I understand the basic syntax changes, but even changes the table names to reflect SWQL objects I can't seem to get this query working in SWQL.
Any help would be much appreciated.