>>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.
>>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:
Discuss challenges in energy and automation with 30,000+ experts and peers.
Find answers in 10,000+ support articles to help solve your product and business challenges.
Find peer based solutions to your questions. Provide answers for fellow community members!