
Posted: 2021-04-04 11:46 AM . Last Modified: 2021-04-04 12:09 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
Link copied. Please paste this link to share this article on your social media post.
Posted: 2021-04-04 11:46 AM . Last Modified: 2021-04-04 12:09 PM
Wrong result in Machine SCADA Expert SQL query.
Hello
I am making a SQL query to a MySQL database.
When I run the query in MySQL, I get the right result.
When I send the SQL statement from Machine SCADA Expert, the result is not right.
It is like the lase WHERE clause is ignored.
This is the Query:
SELECT SUM(Minute_In_State) From
(SELECT
Time_Stamp,
State,
TIMESTAMPDIFF(SECOND, LAG(Time_Stamp) OVER(ORDER BY Time_Stamp), Time_Stamp)
AS Minute_In_State
FROM db.xyz_1_state
ORDER BY Time_Stamp) AS T
Where State = 1;
Any suggestion why the result is different, when sent from Machine SCADA Expert?
- Labels:
-
SCADA
Link copied. Please paste this link to share this article on your social media post.
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
Link copied. Please paste this link to share this article on your social media post.
Posted: 2021-04-04 09:15 PM . Last Modified: 2022-10-19 01:47 AM
This is the Geo SCADA Expert forum. So you're not that likely to get great results looking for Machine SCADA Expert info here (since they are different products).
I think you wanted this forum instead: https://community.se.com/t5/Industry-Automation-and-Control/bd-p/industry-automation-control_forum
Lead Control Systems Engineer for Alliance Automation (VIC).
All opinions are my own and do not represent the opinions or policies of my employer, or of my cat..
Link copied. Please paste this link to share this article on your social media post.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
Link copied. Please paste this link to share this article on your social media post.
Posted: 2021-04-04 09:15 PM . Last Modified: 2022-10-19 01:47 AM
This is the Geo SCADA Expert forum. So you're not that likely to get great results looking for Machine SCADA Expert info here (since they are different products).
I think you wanted this forum instead: https://community.se.com/t5/Industry-Automation-and-Control/bd-p/industry-automation-control_forum
Lead Control Systems Engineer for Alliance Automation (VIC).
All opinions are my own and do not represent the opinions or policies of my employer, or of my cat..
Link copied. Please paste this link to share this article on your social media post.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
Link copied. Please paste this link to share this article on your social media post.
Posted: 2021-04-05 12:51 AM
Oh Ok.
Thanks!!
Link copied. Please paste this link to share this article on your social media post.

