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