Tuesday, 13 January 2015

Query to find default category for a category set :

SELECT   mcats.category_set_name,
           mcat.segment1 default_category,
           mcat.description cat_desc,
           mcat.category_id,
           mcats.category_set_id
    FROM   mtl_category_sets mcats, mtl_categories mcat
   WHERE   mcats.category_set_name LIKE '%'
           AND mcat.category_id = mcats.default_category_id
ORDER BY   1, 2

No comments:

Post a Comment