Does this work? It's probably not as optimised as it could be but it is only a minor change to your querySELECT ca_organization.org_name AS campus, p.host_name AS mcc, ca_owned_resource.resource_name AS app_code, SUM(CASE WHEN prob_ctg.sym LIKE '%password reset%' THEN 1 ELSE 0 END) AS password_reset_count, SUM(CASE WHEN prob_ctg.sym NOT LIKE '%password reset%' THEN 1 ELSE 0 END) AS other_ticket_count,FROM call_req INNER JOIN ca_contact ON call_req.log_agent = ca_contact.contact_uuid INNER JOIN prob_ctg ON call_req.category = prob_ctg.persid INNER JOIN ca_organization ON ca_contact.organization_uuid = ca_organization.organization_uuid INNER JOIN ca_owned_resource ON substring( prob_ctg.sym, 0, 4 ) = substring( ca_owned_resource.resource_name, 0 , 4 ) INNER JOIN busmgt ON ca_owned_resource.own_resource_uuid = busmgt.hier_child INNER JOIN ca_owned_resource p ON busmgt.hier_parent = p.own_resource_uuidWHERE ( call_req.template_name IS NULL ) AND ( busmgt.ci_rel_type = 400027 ) AND ( p.resource_family = 400042 ) -- AND ( prob_ctg.sym LIKE '%password reset%' ) AND ( call_req.open_date >= 1280638800 ) AND ( call_req.open_date <= 1283317200 )GROUP BY ca_organization.org_name, p.host_name, ca_owned_resource.resource_name
Charlie===============================================================Msg 3903, Level 16, State 1, Line 1736The ROLLBACK TRANSACTION request has no corresponding BEGIN TRANSACTION