Last active
March 24, 2016 14:41
-
-
Save colinmurphy/b688debcd424c2dc29f3 to your computer and use it in GitHub Desktop.
Update empty descriptions and short descriptions with the title of the products
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Description | |
UPDATE catalog_product_entity_text as t | |
SET t.value = ( | |
SELECT | |
v.value | |
FROM catalog_product_entity_varchar as v | |
WHERE v.entity_id = t.entity_id | |
AND v.store_id = t.store_id | |
AND v.attribute_id = 71 | |
) | |
WHERE t.attribute_id = 72 | |
AND t.value IS NULL | |
ORDER BY t.value_id ASC | |
LIMIT 1; | |
# Short Description | |
UPDATE catalog_product_entity_text as t | |
SET t.value = ( | |
SELECT | |
v.value | |
FROM catalog_product_entity_varchar as v | |
WHERE v.entity_id = t.entity_id | |
AND v.store_id = t.store_id | |
AND v.attribute_id = 71 | |
) | |
WHERE t.attribute_id = 73 | |
AND t.value IS NULL | |
ORDER BY t.value_id ASC | |
LIMIT 1; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment