It's your place to connect with experts and peers, get continuous support, and share knowledge.
Contact SchneiderCommunity.Support@se.com if you have any questions.
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.
You can subscribe to this forum after you log in or create your free account..
Posted: 2020-01-24 05:07 AM
Is it possible to use Update query to Update one of the Identification property of a Digital point.
But I am not able to do it
SET Description = Newsite
The error i get is The query statement is malfunctioned or invalid. Column Newsite not found..... Equality operation '=' cannot be used with Integer and String.
Is it possible to use Update for Strings ?
Posted: 2020-01-24 05:19 AM
The first error "Column Newsite not found." is occurring because Newsite is missing the enclosing single quotes to make it a string literal (assuming Description is a string field).
The second error "Equality operation '=' cannot be used with Integer and String." is occurring because the ID column is an integer but the value it is being compared with is a string literal (it is enclosed in quotes).
The updated query is:
UPDATE CDBOUTSTATION SET Description = 'Newsite' WHERE ID=10000
Posted: 2020-01-24 05:40 AM
I tried other way as well.
The error i get for that is
The results cannot be displayed.
DML statements not supported from lists
Posted: 2020-01-24 05:49 AM
A list in ViewX (or WebX) is used to display the result set from a query so requires a SELECT statement.
To execute DML statements (UPDATE, CREATE or DELETE) you need to use a different application. The Query Pad tool that comes with ClearSCADA can be used for this purpose.
Posted: 2020-01-24 05:59 AM
Look up QueryPad in the help.
Enter query in the lower pane.
Hint - hold Ctrl key down when pressing Enter to execute a query.
Posted: 2020-02-12 08:28 AM
It does work but I used Point ID to update. I wanted to update the Description of a point, But it had cleared other point descriptions on the same template except the one which I wanted to update. I tried several ways to check it but nothing helped and now I have to manually or use update query to update other points on the same template. And it does not throw up any error.
Posted: 2020-02-12 09:18 AM
If the Point you are trying to update is in an Instance of a Template, is the Attribute of that Point you are trying to update included in the Property Overrides of the Template? If not, you could change the attribute in the template to say "Newsite", then it will be set to all of the instances.
If the Point Attribute is already included in the Property Overrides of the Template, then only new Instances of the original Template would say this. Which is likely part of what you would like to happen.
To go back and fill in the attribute on Instances of the Template where the Property Override for the Attribute is already turned on and the Attribute is blank for many of the Instances, you likely need to take a slightly different approach.
One way I have updated Point.objDescription attributes is to setup a Function Block Diagram set to an interval of 0 seconds in the Template, then map out somewhere that has the objDescription I desire, or even a Constant in the FBD, to the Point.objDescription. Then there are two ways to execute all of the FBD's, either manually one at a time, or by creating a Structured Text program that finds all of the FBD's of a particular name and executing them.
The second way is much like the ST program mentioned just above for executing a FBD with the time interval set to 0 seconds. Write a ST program with a Query in it that will find all of the Instances of a particular template, and will update the Point.Attribute. Of course some care needs to be taken in setting up the query to not update Instances of the Template you don't want it to. For instance having the ST Query only return results where the Point.Attribute is empty, or in a specific Group, etc.
Posted: 2020-02-12 01:42 PM
I think you should just tell us what it is you're ultimately trying to do.
Only giving us a small part of the puzzle results in us giving you the wrong puzzle solution.
If I were to guess, you want to update all instances of a point (which derives from a template site/device) so that some aspect of the point description will relate back to the site in which it is actually contained. Correct?
So the way that I would do this is: QueryPad
If you have your template like
-> Pump 1
and you want the Running point Description to be updated to say 'Site Name - Pump 1 - Running'
Then you could do this as (@sbeadle no SQL code entry 😞 )
SET Description = ParentGroupId->ParentGroupId->ParentGroupId->Name || ' - ' || ParentGroupId->Name || ' - ' || Name
AND ParentGroupId->ParentGroupId->ParentGroupId->TemplateId=[MAGIC NUMBER]