Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- SELECT @APower24Cell = AVG((CAST(ACurrent24Cell as FLOAT)*CAST(AVoltage3Sec as FLOAT))/10)/1000 ,
- @BPower24Cell = AVG((CAST(BCurrent24Cell as FLOAT)*CAST(BVoltage3Sec as FLOAT))/10)/1000 ,
- @CPower24Cell = AVG((CAST(CCurrent24Cell as FLOAT)*CAST(CVoltage3Sec as FLOAT))/10)/1000 ,
- @APower35Cell = AVG((CAST(ACurrent35Cell as FLOAT)*CAST(AVoltage3Sec as FLOAT))/10)/1000 ,
- @BPower35Cell = AVG((CAST(BCurrent35Cell as FLOAT)*CAST(BVoltage3Sec as FLOAT))/10)/1000 ,
- @CPower35Cell = AVG((CAST(CCurrent35Cell as FLOAT)*CAST(CVoltage3Sec as FLOAT))/10)/1000
- FROM Energomonitoring
- WHERE TS >= DATEADD(HOUR,-24,GETDATE()) GROUP BY TS
- SET @FULLPOWER = (@APower24Cell+@BPower24Cell+@CPower24Cell+@APower35Cell+@BPower35Cell+@CPower35Cell) * DATEDIFF(hour, dateadd(hour, datepart(hour,GETDATE()),CAST(convert(varchar(20),getdate(),112) as datetime)), GETDATE())
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement