Query for active Category / Subcategory / Items

Query for active Category / Subcategory / Items

Hi,

Can I have a query to find out list of active Category / Subcategory / Items. I tried the below query but it giving me list of all active and inactive Category / Subcategory / Items.

select cat.categoryname 'Category',sub.name 'Subcategory',item.name 'Item' from categorydefinition cat left join subcategorydefinition sub on cat.categoryid=sub.categoryid left join
itemdefinition item on item.subcategoryid=sub.subcategoryid


Thanks in advance








                  New to ADSelfService Plus?