Is a way to compare 2 records from the same table? I already compared two tables to make sure my records are accurate using
SELECT *
FROM `catalog_category_entity_varchar` c2t
WHERE NOT EXISTS (
SELECT *
FROM `core_url_rewrite` c
WHERE c.category_id = c2t.entity_id
)
Now I am trying to compare the records in catalog_category_entity_varchar for any inconsistancies. Here's an example of my two records.
catalog_category_entity_varchar:
Record 1:
value_id: 68
entity_type_id: 3
attribute_id: 43
store_id: 0
entity_id: 10
value: shop-by
Record 2:
value_id: 73
entity_type_id: 3
attribute_id: 57
store_id: 0
entity_id: 10
value: shop-by.html
entity_id is the unique Identifier. I have to compare the value of url key which is attribute_id = 43 to value of url which is attribute_id 57. I assume I have to use the wildcard % after, which will remove the .html, and another before, which will remove part of the url on any level 2+ category urls (ex. catalog/shirts/shop-by.html).
If it makes it easier I can duplicate the table, and my initial compare statement, I just need to know how to modify the query to match the attribute ID's and use the wildcard.