Hopefully MS will implement Standard SQL's LAG/LEAD/FIRST_VALUE/LAST_VALUE including the option in a future release. Then it's a simple "LAG(col1 IGNORE NULLS) OVER (ORDER BY id)"
T-SQL Challenge - CombinationsCommented on: 8 years ago
(January 28, 2008)
I like that puzzle, you just have to know how recursive queries work :-)
WITH cte (vid, amt)
SELECT vid, amt
SELECT v.vid, cte.amt + v.amt
FROM vouchers AS v...
Mode PuzzleCommented on: 8 years ago
(October 4, 2007)
Nested aggregates, before SS2005 this was quite awfull, but now there's WITH or (my favourite) OLAP functions: Easy to write and easy to extend
Digital Magazine Archives
Browse back issues of SQL Server Pro, from January 2007 through the last issue published in April 2014. Find the back issues here.
High-quality data is key to uncovering meaningful insights and new opportunities. Melissa Data has recently released a new tool, Data Profiler, to help companies that are dealing with large quantities of data and need a full spectrum of solutions that work....More
Don't forget to migrate Power BI for Office 365 content before you leave for the holidays. Deprecation of Power BI for Office 365 starts at the end of December 2015. Here is what you need to know to successfully move your business intelligence content to the latest and greatest version of Microsoft Power BI....More