Acknowledging Success

Today is the Redgate annual award event, and I’m honored to be hosting again. I’ve been asked a few times, and I used to look forward to the gathering in Cambridge followed by our annual Christmas party. Last year this was virtual, as it is this year, so I’m hosting again from my home office. Not what I had hoped would happen, but I’ll have some fun. Last year I had a number of shirt changes between my parts, and I may do that again.

I know there are often annual sales awards in many companies, usually with some vacation or prize being given out, but not a lot outside of the sales department. In most of my jobs, we’ve usually had some sort of holiday party, but nothing else for most employees.

As we approach the end of the year, I wonder if you find your organization doing any sort of recognition for your work this year? Or maybe highlighting those that have gone above and beyond what is expected? At Redgate, we have nominations in various categories. Some are sales-oriented, but we have an open award category as well as an ingeniously simple one. We’ve had people or groups from different parts of the company win that one.

I think that recognition of effort and work accomplished is important for the morale and motivation of employees. When management recognizes people for their hard work and lets other employees have input into the process, you build a better team of people working together. Even when we aren’t the winners, we can appreciate the effort that others put into improving the organization.

My view is that few too few in the management of organizations appreciate the value of employees, especially the knowledge workers. Replacing people is hard, and it is expensive. Unmotivated people do less work and do it less well. I hope that more organizations learn this and start to put effort into valuing those that contribute to everyone’s success.

Steve Jones

Listen to the podcast at Libsyn, Stitcher, Spotify, or iTunes.

Posted in Editorial | Tagged , | Comments Off on Acknowledging Success

Daily Coping 13 Dec 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 do something helpful for a friend or family member.

My daughter is coming home, after being away at university since early August. I’ve been caring for her plants, so watering every few days, but I did a few extra things to prepare for her visit.

First, I cleaned the linens in her room, so when she gets home (late in a week), the bed is clean. I also bought some kitty litter, as she’s returning with her cat and there aren’t supplies in her room.

Posted in Blog | Tagged , , | Comments Off on Daily Coping 13 Dec 2021

2021 Advent of Code–#SQLNewBlogger

Another post for me that is simple and hopefully serves as an example for people trying to get blogging as #SQLNewBloggers.

I’ll do a post on how to easily get started here as a new blogger, but following the Advent of Code, even some random problems, is a good way to show off some T-SQL skills.

This won’t be a goal for me, but I did start working on the 2021 Advent of Code, taking a few minutes across some days to break from other work and solve a programming problem.

My aim this time is not to get stuck on a problem. If I can’t solve it, or don’t see a way, I leave it and move on. This post has a few thoughts on the first few days.

Day 1

The first problem dealt with loading a set of data and then counting how many times the number increases from the previous number.

Since numbers in a SQL table don’t have a guaranteed order, this was a bit of a hack from me. I created a table and added a clustered index, and then bulk inserted the data. I then moved this in the same order (I hope) to a table with an identity column. From here, simple LEAD to find the differences between consecutive rows and counting these.

The second part changed the calculation slightly to use groups of three rows. I copied my LEAD formula to include 3 rows instead of just 1 in each side of the calculation.

Day 2

We’re in a submarine, moving forward or up/down. The input was something I needed to evaluate in order again, so I repeated a similar load. Then I used SUBSTRING and CASE to decide what type of instruction was needed and sum the results.

Part 2 was tricky. I bailed initially, as I couldn’t quite get the math down in my head. I eventually set up a small test data set using the values on the site and then used that to calculate things. I had a series of CTEs that I used to extract the values, then get changes, then perform the math.

Letting part 2 sit for a day in my head helped me focus better.

Day 3

Day 3 was fairly easy binary counting. The test data doesn’t depend on order, so I just loaded it up. Then I need to extract the values into the bits, so SUBSTRING each of these out in a CTE. Not dynamic, but it was easy to extract all 12 bits, then count up the number of 1s and 0s, deciding which was more prevalent.

From there, a simple calc to assemble back the counts into a binary number and convert to decimal.

Part 2 is really about counting the 1s and 0s in each position, then creating a final binary number from this and converting back to decimal. I had to read carefully here, as you need to reduce your input set each time. I ended up looping here, as I couldn’t find an easy way to do this otherwise. I could have added some flag to ignore rows, but ended up with a temp table and deletes to get this done.

So far, easy, harder, then easier.

Posted in Blog | Tagged , , , | Comments Off on 2021 Advent of Code–#SQLNewBlogger

Daily Coping 10 Dec 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 support a charity, cause, or campaign you care about.

I tend to concern myself with charities that deal with kids, food, and education. I support Habitat, mostly because this helps families and kids get into stable situations.

This month is one to think about others. I’m volunteering next week for Habitat, giving a day of time to help build a new house.

I’ve also purchased a few extra items at the grocery for local food banks, giving them donations to help with their work.

Posted in Blog | Tagged , , | 1 Comment