Hi
I have been trying to create a view where I and list out OTI reason in one column and then a count of account managers that have had these OTIFS against there orders
So trying to get this look from the query as below
I currently have this query and the output thus far.
SELECT (db
rderHeader.udfSalesOrderOTIF) AS Count, db
rderHeader.OrderStatus, dbo.SalesRep.Name,
db
rderHeader.udfSalesOrderOTIF
FROM db
rderHeader INNER JOIN
dbo.SalesRep ON db
rderHeader.SalesRepID = dbo.SalesRep.SalesRepID
GROUP BY db
rderHeader.OrderStatus, dbo.SalesRep.Name, db
rderHeader.udfSalesOrderOTIF
HAVING (db
rderHeader.OrderStatus = 8) AND (NOT (COUNT(db
rderHeader.udfSalesOrderOTIF) IS NULL)) AND (NOT (db
rderHeader.udfSalesOrderOTIF IS NULL))
ORDER BY COUNT(db
rderHeader.udfSalesOrderOTIF)
Could someone point me in the right direction please
Thanks
I have been trying to create a view where I and list out OTI reason in one column and then a count of account managers that have had these OTIFS against there orders
So trying to get this look from the query as below

I currently have this query and the output thus far.
SELECT (db
db
FROM db
dbo.SalesRep ON db
GROUP BY db
HAVING (db
ORDER BY COUNT(db

Could someone point me in the right direction please
Thanks