SELECT diff = CASE
WHEN Datediff(d,[assigned time],[closed#time]) = 0
THEN 'Same Day'
WHEN Datediff(d,[assigned time],[closed#time]) = 1
THEN '1 Day'
WHEN Datediff(d,[assigned time],[closed#time]) = 2
THEN '2 Days'
WHEN Datediff(d,[assigned time],[closed#time]) = 3
THEN '3 Days'
WHEN Datediff(d,[assigned time],[closed#time]) BETWEEN 4 AND 999
THEN 'Too much'
END,
data_value,
[Assigned Team],
closed#time,
[Assigned Time],
functionalteam = CASE
WHEN [SCHEMA] = 'ISD'
AND [assigned team] = 'Workstation Engineering'
THEN 'Store Workstation'
WHEN [SCHEMA] = 'ISD'
AND [assigned team] = 'Windows Server Engineering'
THEN 'Store Server'
WHEN [SCHEMA] = 'HOSupport'
AND [assigned team] = 'Workstation Engineering'
THEN 'HO Workstation'
WHEN [SCHEMA] = 'Unix-Operations'
AND [assigned team] = 'Windows Server Engineering'
THEN 'HO/DC Server'
WHEN [SCHEMA] = 'Unix-Operations'
AND [assigned team] = 'Compucom Hardware Support'
THEN 'HO/DC Server'
END,
*
|