×

Welcome to TagMyCode

Please login or create account to add a snippet.
0
0
 
0
Language: SQL
Posted by: Jakub Polok
Added: May 13, 2022 11:37 AM
Views: 4
Tags: no tags
  1. UPDATE `emaillog` Y
  2. SET Y.`node_moduleid` = (SELECT node_moduleid FROM (SELECT X.node_moduleid FROM emaillog X WHERE X.id = CAST(JSON_EXTRACT(Y.`config`, '$.ThreadLogId') AS UNSIGNED)) AS Z)
  3. WHERE (((Y.`incomingmessage` <=> TRUE)) AND ((Y.`node_moduleid` IS NULL)) AND ((NOT Y.`node_id` IS NULL)) AND
  4.        (((NOT JSON_EXTRACT(Y.`config`, '$.ThreadLogId') IS NULL AND NOT JSON_EXTRACT(Y.`config`, '$.ThreadLogId') = CAST('null' AS JSON))))) AND
  5.         (Y.`isdeleted` = 0);