TheBugSlayer
Programmer
Hi guys.
I have a very simple query:
The result is:
Code TotalCases DateToProcess
D 18 12/10/2012
D 3 12/10/2012
N 8 12/10/2012
S 512 12/10/2012
but I would like to get:
Code TotalCases DateToProcess
D 21 12/10/2012
N 8 12/10/2012
S 512 12/10/2012
What's the easiest way?
Thank you.
MCP SQL Server 2000, MCTS SQL Server 2005, MCTS SQL Server 2008 (DBD, DBA)
I have a very simple query:
Code:
SELECT CASE LTRIM(RTRIM(CaseType))
WHEN 'Surgical' THEN 'S'
WHEN 'Dermatology' THEN 'D'
WHEN 'Fluorescence' THEN 'D'
WHEN 'Non-GYN Cytology' THEN 'N'
END AS Code, COUNT(Accession), ReceivedDate AS DateToProcess FROM PathSolutionsStaging
GROUP BY ALL CaseType, ReceivedDate
The result is:
Code TotalCases DateToProcess
D 18 12/10/2012
D 3 12/10/2012
N 8 12/10/2012
S 512 12/10/2012
but I would like to get:
Code TotalCases DateToProcess
D 21 12/10/2012
N 8 12/10/2012
S 512 12/10/2012
What's the easiest way?
Thank you.
MCP SQL Server 2000, MCTS SQL Server 2005, MCTS SQL Server 2008 (DBD, DBA)