in my database this gives me the correct coupon results im looking for
SELECT p.`ID`, p.`post_title`, p.`post_excerpt`
FROM `wp_posts` AS p
INNER JOIN `wp_postmeta` AS pm ON p.`ID` = pm.`post_id`
WHERE p.`post_type` = 'shop_coupon'
AND pm.`meta_key` = 'product_ids'
AND pm.`meta_value` = '131239'
but i need to update all these coupons its over 5k in coupons and the standard import/merge is not updating the coupon description, its essential that our coupons have the correct description due to our accounting system so i need to update them by sql
UPDATE p SET p.post_excerpt = 'emesa'
FROM wp_posts AS p
INNER JOIN wp_postmeta AS pm
ON p.ID = pm.post_id
WHERE p.post_type = 'shop_coupon'
AND pm.meta_key = 'product_ids'
AND pm.meta_value = '131239'
using update set does not work.