This session will examine ways to write better code by using CTEs to simplify queries, implement error handling to deal with problematic data, and show a few tips and tricks for writing code quicker and generating enough test data to properly evaluate your queries.
We'll examine a few intermediate techniques for efficient queries. We start with tally tables and calendar tables, showing practical uses of each. We will then look at pivoting data to display row data as column data and vice versa.
In this session, we'll examine the windowing functions in SQL Server that allow you to efficiently query data in groups, or partitions, and answer complex questions such as running totals and ranking results into percentiles.
My initial goal in writing this series of posts was to outline some of the concerns surrounding Availability Groups (AGs) and SQL Server Agent Jobs – and call out how there is virtually no guidance from Microsoft on this front and then detail some of the pitfalls and options available for tackling this problem domain. I initially expected this series of posts to have between 25 and 30 posts – according to some of the early outlines I created ‘way back when’....More
Throughout this series of posts I’ve taken a somewhat pessimistic view of how SQL Server Agent jobs are managed within most organizations – meaning that most of the code and examples I’ve provided up until this point were based on assumptions about how CHANGE to jobs is managed. That pessimism, to date, has come in two forms:...More
In this series of posts I’ve called out some of the concerns related to SQL Server AlwaysOn Availability Groups and their interaction with SQL Server Agent jobs – both in the form of Batch Jobs (see post #3) and backups....More