Viewing 15 posts - 1,381 through 1,395 (of 4,087 total)
Yes. Use GROUPING SETS. If you want a more complete answer, post sample data and expected results as outlined in the first link in my signature.
This would be...
January 2, 2018 at 1:25 pm
January 2, 2018 at 12:36 pm
A situation came up today that really has me irked. I work for an IT consulting agency and...
January 2, 2018 at 11:48 am
-- SQL Server will...
January 2, 2018 at 11:30 am
They switched to using the Visual Studio regex language. Using Regular Expressions in Visual Studio,
Drew
January 2, 2018 at 9:52 am
This also gives the expected results.
;
WITH Company_Groups AS
(
SELECT c.*, FIRST_VALUE(c.CompanyName) OVER(PARTITION BY g.GroupNumber ORDER BY c.CompanyStatus ROWS UNBOUNDED PRECEDING) AS GroupName
...
December 29, 2017 at 9:03 am
The two main methods are the CROSS APPLY (suggested by Piet) and the CTE/ROW_NUMBER (suggested by Sue and...
December 28, 2017 at 9:24 am
Anyone else notice that read threads are being marked unread even though there are no new posts? I'm pretty sure that I've read everything in a thread if I'm marked...
December 27, 2017 at 2:41 pm
The week between Christmas and New Year's has rarely been a slow week for me. For most of my career, I was in fund-raising, and that week was one of...
December 27, 2017 at 7:37 am
Viewing 15 posts - 1,381 through 1,395 (of 4,087 total)