- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
We have a script where we insert an ECC queue record to UPDATE a SQL table. When we set the SQL query to be a SELECT statement it works. But when we change the SQL statement to be an UPDATE we get the following error:
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
We have found a solution - This is the parameter that we required to get the UPDATE of the SQL table to execute successfully:
<parameter name= "work" ><update table = "alerts.status" where = "ServerName %= 'NCOMS' AND ServerSerial=3935" ><Agent>ServiceNow - INC10020</Agent><URL>http://Macintosh-9.local:8080/glide/incident.do?sys_id=17a31f380a0a0bae0048ca875c8891d0</URL><Severity quoted = "false" >3</Severity><Acknowledged quoted = "false" >0</Acknowledged></update></parameter>
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Thanks for the response! So the way we are doing this is via an onAfter script of a transform map. In the script we hard-code the payload and insert a record on the ECC queue. This will go via the MID Server to update the SQL database. The issue is that when the SQL statement is a "SELECT" it works, but when it is an "UPDATE" it does not work. Please advise.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago - last edited 3 weeks ago
I put your thread title in the search on google.com. Try that, the AI response discusses what you seem to want. also, post on the thread I provided a link to. Folks there may be able to help. I do not practice what you want to achieve. I suspect there are permission problems on the SQL server where a query works but not updating a record in the database works. There should be some error/logs there showing the problem.
On the google response, click "Dive deeper in AI mode" examples are shown.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
ECC Queue Record Configuration:
Table: ecc_queue
- agent: [your_mid_server]
- topic: [your_topic]
- name: "executeUpdate"
- payload: [your UPDATE SQL statement]
- source: [source_identifier]