Category: Blog

  • Cleaning Up Stats Data for Volleyball

    One of the things I’ve done the last few years is collect statistics as a coach for the kids I work with. Helping them understand how they are performing in competition is important, and it’s a good way to see if we are actually improving play.

    I use paper and pencil to gather data, because it’s reliable and quick. Most of the apps I see try to prevent bad data by enforcing certain flows of data, but I find this often means a mis-press on a tablet screen results in lost data because the game moves too fast. The apps aren’t flexible, either, so it’s hard to grab practice data.

    Last year I collected data like this:

    2021-06-01 14_23_21-TeamStatsByGame.xlsx - Excel

    I’d total data and then drop it in the spreadsheet, with a formula to calculate percentages. I report this to athletes and parents, which worked well. However, I wanted to build some graphs, which this format doesn’t make easy to consume.

    Putting Data in a Table

    My kids and parents don’t have a database tool, so I need to give them raw data in Excel. That works well for all of them and they can read the data. This year, I decided to give them a similar “dashboard” of data for each competition. The format I chose looks like this:

    2021-06-01 14_30_42-Stats2021_15Select.xlsx - Excel

    Not the best format, but it is easy to print and discuss with players.

    For more extensive reporting across the season, however, I need to capture data in a different format.

    As a result, when I take data from my paper and enter it, I do so in a separate worksheet in the same file, but in a tabular format. Here’s a sample of one of my sheets. This one captures Serve data.

    2021-06-01 14_32_57-Stats2021_15Select.xlsx - Excel

    For a particular tournament, I use a formula to add up the data for each player. Since I store the data for players in the same order each time, I can easily create a formula for 1 player and then copy/paste that for other players. It’s a little manual work, but it goes quite quickly as I go through the data after a tournament.

    Next Steps

    The goal from here was to publish this data as an interactive report. I want to build a PowerBI report and then make it available, but that’s for another post.

  • Daily Coping 14 Jun 2021

    I started to add a daily coping tip to the SQLServerCentral newsletter and to the Community Circle, which is helping me deal with the issues in the world. I’m adding my responses for each day here. All my coping tips are under this tag. 

    Today’s tip is to eat good food that makes you happy.

    Diet is important, and what makes you happy isn’t always what’s good for your body. Certainly moderation matters, but I’m also not someone that wants to deny myself food constantly and miss out on life.

    For me, pizza is one of those things that I really enjoy. I don’t get it often, or make it, but I did the other day. After a good workout, I swung by a local place for a couple slices to unwind and enjoy a little life.

  • Using SQL Compare for One Procedure

    A customer recently was concerned about the time to run SQL Compare for a large database. They were synching with the command line, but at times they want to just sync up a procedure or two from one database to the other.

    I knew this could be done and passed along some ideas, but decided to write a post. This post looks at how to do this.

    A CLI Comparison

    The SQL Compare command line is pretty easy to use. Lots of switches and options, but the simple thing is point it to a couple instances and databases and get a comparison. Here’s a command line.

    sqlcompare /server1:Aristotle\SQL2017 /server2:Aristotle\SQL2017 /database1:compare1 /database2:compare2

    And the result. You can see below I have a table and three procedures that are different.

    2021-06-09 17_31_32-cmd

    If I want to limit what’s compared, I can certainly use a filter, but from the command line, there’s a simple way to see certain objects. There is an INCLUDE switch that I can use to just set a filter here without creating a file.

    For example, if I want to just see stored procedures, I can do this:

    sqlcompare /server1:Aristotle\SQL2017 /server2:Aristotle\SQL2017 /database1:compare1 /database2:compare2 /Include:storedprocedure:

    This gives me just my three stored procedures.

    2021-06-09 17_42_14-cmd

    Likewise, I can also change this to a table and just get that object.

    2021-06-09 17_42_33-cmd

    If I want a specific object, I can get that as well. Here I use the include like this:

    /Include:storedprocedure:\[GetMyTable\]

    Then I get just my one object, with a faster compare. Only this one is checked.

    2021-06-09 17_44_12-cmd

    Then if I add the Synchonize switch, the changes will get deployed.

    I often find that people are looking to deploy quickly just a known object or two for some hotfix or out of band change. Using the command line let’s me pick an object that I know about and build a comparison for just that object.

    There are lots of options and ways to use SQL Compare, and I’d urge you to explore a bit as you look to improve your database deployments. If you don’t have it yet, download an eval and give it a try.

  • Daily Coping 11 June 2021

    I started to add a daily coping tip to the SQLServerCentral newsletter and to the Community Circle, which is helping me deal with the issues in the world. I’m adding my responses for each day here. All my coping tips are under this tag. 

    Today’s tip is to get out into a green space and enjoy nature.

    I got to do this on holiday recently. My wife and I went to Key West, and we took a day to kayak around mangrove swamps. It was surprisingly fun, and it was neat to be in nature, quite separated from everything else. Going through the tunnels in the forest was quite an experience.

    20210607_145213

    Peaceful and quiet, almost like being in another world.