New Community Ranking System
Our Community ranking system has recently been updated. You may notice changes in user rankings and receive system messages or notifications. If you have questions about how the new ranking works, please refer to the announcement post for more details (click here).
Newline character in a SQL query in Clear SCADA?
EcoStruxure Geo SCADA Expert Forum
Schneider Electric support forum about installation, configuration, integration and troubleshooting of EcoStruxure Geo SCADA Expert (ClearSCADA, ViewX, WebX).
Search in
Improve your search experience:
Exact phrase→Use quotes " "(e.g., "error 404")
Wildcard→Use * for partial words(e.g., build*, *tion)
AND / OR→Combine keywords(e.g., login AND error, login OR sign‑in)
Keep it short→Use 2–3 relevant words, not full sentences
Filters→Narrow results by section(Knowledge Base, Users, Products)
Send a co-worker an invite to the portal.Just enter their email address and we'll connect them to register. After joining, they will belong to the same company.
You have entered an invalid email address. Please re-enter the email address.
This co-worker has already been invited to the Exchange portal. Please invite another co-worker.
Please enter email address
Send InviteCancel
Invitation Sent
Your invitation was sent.Thanks for sharing Exchange with your co-worker.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2020-10-0504:12 PM. Last Modified: 2023-05-0312:09 AM
Newline character in a SQL query in Clear SCADA?
I'm trying to export data from one system to import into another using CSV and new line characters in notes are making it difficult. I have tried the following query to get the data but it isn't working. Is there a way to replace newline characters in a SQL query in ClearSCADA?
I have tried the following query and tried this "Replace( "Message", '\n', '{3}' )" in it but didnt work for me:
SELECT TOP( 100000 ) "RecordId", "SeverityDesc" AS "~SeverityDesc", "RecordTime" AS "~RecordTime", Replace( "Message", '\n', '{3}' ) AS "Message", "User", "Category", "Foreground", "SeqNo", "CommentNo" FROM CDBEVENTJOURNAL WHERE ( "~RecordTime" BETWEEN { OPC 'H-23H' } AND { OPC 'H+1H' } ) AND ( "Id" = 772856 ) ORDER BY "~RecordTime" DESC, "SeqNo" DESC, "CommentNo" ASC
Link copied. Please paste this link to share this article on your social media post.
Posted: 2020-10-0706:15 AM
If you are using the SQL Export object with that query, I wouldn't think that you need the /n for a new line at all. Maybe I'm missing what the Replace and {3} are for. But I would change Replace( "Message", '\n', '{3}' ) AS "Message" to "Message" AS "Message".