Welcome to the new Schneider Electric Community

It's your place to connect with experts and peers, get continuous support, and share knowledge.

  • Explore the new navigation for even easier access to your community.
  • Bookmark and use our new, easy-to-remember address (community.se.com).
  • Get ready for more content and an improved experience.

Contact SchneiderCommunity.Support@se.com if you have any questions.

Close
Invite a Co-worker
Send a co-worker an invite to the Exchange portal.Just enter their email address and we’ll connect them to register. After joining, they will belong to the same company.
Send Invite Cancel
84248members
353348posts

[Imported] Stuck on sql code

EcoStruxure Geo SCADA Expert Forum

Find out how SCADA systems and networks, like EcoStruxure Geo SCADA Expert, help industrial organizations maintaining efficiency, processing data for smarter decision making with IoT, RTU and PLC devices.

sbeadle
Janeway Janeway
Janeway
0 Likes
1
288

[Imported] Stuck on sql code

>>Message imported from previous forum - Category:General Items<<
User: ROVSCADAENGINEER, originally posted: 2019-02-20 22:40:26 Id:369
Ok so I am stuck on some SQL code as I am trying to write to the registry a name for the embedded list on the mimic so I can edit the filters on the list through click buttons. the code which is working on the query option is below:

SELECT
RECORDTIME, SEVERITY, SOURCE, MESSAGE, USER, CATEGORY, FOREGROUND, SEQNO, COMMENTNO, ID
FROM
CDBEVENTJOURNAL
WHERE
SOURCE LIKE '%Overflow Float%' AND ( RECORDTIME BETWEEN { OPC 'H-10D' } AND { OPC 'H' } ) AND SEVERITY = 'Critical'

Yet the code that I put in the animation sql expression is similar to another working code on another embedded list yet does not work. can anyone see where I may be going wrong. scada keeps saying that ) is expected. yet I cannot figure it out.

'SELECT RecordId, SeverityDesc, RecordTime, Message, User, Category, Foreground, SeqNo, CommentNo,id FROM CDBEVENTJOURNAL '+ REGISTRY( 'OverflowFloatsList', 'WHERE source LIKE '%Overflow Float%' and ( RecordTime BETWEEN { OPC ''H-24H'' } AND { OPC ''H'' } )') and SEVERITY = 'Critical'

I am going to try the code in query pad and see if I get a more particular analysis.

1 Reply 1
sbeadle
Janeway Janeway
Janeway
0 Likes
0
287

Re: [Imported] Stuck on sql code

>>Responses imported from previous forum


Reply From User: ROVSCADAENGINEER, posted: 2019-02-20 23:34:00
I got it working

'SELECT RECORDTIME, SEVERITY, SOURCE, MESSAGE, USER, CATEGORY, FOREGROUND, SEQNO, COMMENTNO, ID FROM CDBEVENTJOURNAL '+ REGISTRY( 'smsLists', ' WHERE SOURCE LIKE ''%Overflow Float%'' AND ( RECORDTIME BETWEEN { OPC ''H-10D'' } AND { OPC ''H'' } ) AND SEVERITY = ''Critical'')')


Reply From User: du5tin, posted: 2019-03-06 17:07:00
Yeah... escape characters are definitely needed for animations. :smiley: