Timeline for Repair orders query in SQL Server with subselects
Current License: CC BY-SA 3.0
7 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Jun 30, 2016 at 16:33 | comment | added | S3S | Yes, @IvanStarostin pointed that out I just haven't had time to fix it. This was migrated from StackOverFlow. I don't monitor CodeReview that often. | |
Jun 30, 2016 at 16:28 | history | edited | S3S | CC BY-SA 3.0 |
added 16 characters in body
|
Jun 30, 2016 at 16:21 | comment | added | dnoeth |
This is not going to return the expected result set, you need to do the CASE within SUM, not the SUM within CASE: SUM(CASE WHEN NextActivity = 'NEW ORDER REVIEW' THEN Items ELSE 0 END AS BlindsInQuestioning
|
|
Jun 28, 2016 at 18:31 | history | migrated | from stackoverflow.com (revisions) | ||
Jun 27, 2016 at 18:56 | vote | accept | CommunityBot | ||
Jun 27, 2016 at 18:54 | comment | added | IVNSTN |
Topsy-turvy a little. NextActivity is not in GROUP BY list and will cause compile error. SUM(CASE WHEN...)
|
|
Jun 27, 2016 at 18:35 | history | answered | S3S | CC BY-SA 3.0 |