>>Message imported from previous forum - Category:Scripts and Tips<<
User: mchartrand, originally posted: 2018-10-25 17:57:00 Id:261
This is a re-posting from the obsoleted (October 2018) "Schneider Electric Telemetry & SCADA" forum.
_______
**_Andrew:
Can i run a query and use the delete statement_**
_____________
trentonite:
Yeah you can but only against table items.
ex: I have a data table named TestDT and want to clear its contents
DELETE FROM TESTDT
additionally, you can use update queries to update properties on objects
ex: I want to update a points alarm source where it's ID = 12345
UPDATE CPointAlg SET AlarmSource = 'Test Pt Alarm Source' WHERE ID = 12345
I don't believe you can do a DELETE from against property/metadata values so you'd end up running an update and setting the value to empty ( '' )
_____________________
AWoodland:
Just to expand on the above comment, look up Server.Query in the help for how to actually execute the queries.
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!