Hello,
I am trying to write an SQL query for a help desk system that I am developing. I have these two tables called Technician and WorkOrder. The WorkOrder table has a Technician ID field that marks which Technician was assigned to it.
I would like to create an SQL statement that will return each Technician, how many work orders they've been assigned (Technician.ID = WorkOrder.TechID), and how many of them are still open (WorkOrder.Status = 1)
I can manage to get two of the values with a GROUP BY statement but I am wondering if all three values can be retrieved with a compound statement or if I am just better off retrieving two separate data sets.
2006-11-20
15:59:23
·
5 answers
·
asked by
soulblazer28
2
in
Computers & Internet
➔ Programming & Design
BTW this is for MS SQL 2005
2006-11-20
16:00:27 ·
update #1