Hi All,
I have this table
SELECT dbo.org_tree.org_id
,dbo.org_tree.parent_id
,dbo.org_tree.isleaf
,dbo.org.company_name
descendent_count
ancestor_count
,dbo.org.sid2_id
,dbo.org.reporting_level
,dbo.org.sales_rep_id
FROM dbo.org
if organisation 1 is a a reporting level and it or its descendants do not have the same rep assigned then I want a list of all the organisations which are reporting level 1 along with all their descendants if sales rep is different like the following table
MH