-->
SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 

Gavin Draper's SQL Server Blog

Software Dev/DBA living the dream in sunny Brighton, UK. I've been playing with SQL Server about nearly 20 years now and still feel just as clueless as I did back then. I love writing about things I find as I go along.

Archives: April 2018

SQL Server Removing Outliers With Standard Deviation

When running aggregations for reporting in some situations outliers can throw out the numbers.

For example lets say we have a report that shows the quantity of stock lines delivered to the the many warehouses of company X per day. Then lets imagine that a few times a year company… Read more

0 comments, 77 reads

Posted in Gavin Draper's SQL Server Blog on 30 April 2018

SQL Server Minimum Memory Setting

There is almost never a reason to set this setting unless you’re running other apps on the same server as your SQL Instance and are trying to stop them taking the memory you want the SQL Server to have. It’s always preferable to have your SQL Server be the only… Read more

0 comments, 55 reads

Posted in Gavin Draper's SQL Server Blog on 29 April 2018

SQL Server Advanced Aggregations Part 2 ROLLUP and CUBE

This post is part 2 of a 3 part series…

  1. Part 1 Grouping Sets
  2. Part 2 ROLLUP and CUBE
  3. Part 3 GROUPING and GROUPING_ID

Following on from my previous post on GROUPING SETS I thought I’d cover a couple of other more advanced aggregation options that are often missed, namely… Read more

0 comments, 54 reads

Posted in Gavin Draper's SQL Server Blog on 28 April 2018

SQL Server Advanced Aggregations Part 1 Grouping Sets

This post is part 1 of a 3 part series…

  1. Part 1 Grouping Sets
  2. Part 2 ROLLUP and CUBE
  3. Part 3 GROUPING and GROUPING_ID

Grouping Sets can be a powerful tool for reporting aggregations. Let’s imagine we have a sales table with a SaleDate and want a count of sales… Read more

0 comments, 60 reads

Posted in Gavin Draper's SQL Server Blog on 26 April 2018

SQL Server Nested Transactions Probably Don't Work How You Think

SQL Server allows you to nest multiple transactions but the results of doing so are completely not obvious.

Take the following example…

BEGIN TRAN
    INSERT INTO MyTable(Blah) VALUES('Blah')
    BEGIN TRAN
        INSERT INTO MyTable(Blah) VALUES('Blah2')
    ROLLBACK
COMMIT

In this… Read more

0 comments, 25 reads

Posted in Gavin Draper's SQL Server Blog on 25 April 2018