More Fun with SQL Server “Denali” Window Functions

In my last post I described scenarios where the improvements to the SQL Server “Denali” windows functions could address a common scenario of getting year to date sales from a list of monthly amounts. In this post we will explore a couple of other advances in the Windows functions and how they might be applied…

0

Re-summarizing data using UNPIVOT, ROW_NUMBER and CTEs–Denali Style

  Last month I did a write up on a common scenario that I have seen with my customers where data needs to be re-summarized and the customer would like to avoid writing data into intermediate tables. For example, they may receive a flat file from an external source that has sales amount by month…

0

Re-summarizing data using UNPIVOT, ROW_NUMBER and CTEs

I had a question recently where a customer was presented a set of tables summarized by month and he was asked to re-summarize the data giving year to date summaries. This was a “one time” request so we wanted to get results quickly and then refine the process once the customer decided how/if they wanted…

1

Finding holes in number sequences using CTEs and Ranking functions

I have had a number of customers looking to manage number sequences for various scenarios. An example might be purchase order numbers where multiple systems need to “reserve” batches of PO Numbers. For example, an application may need to run a print job to print 10,000 paper purchase orders and an online application may need…

0