Author: way0utwest

  • A Quick Break and New Adventure

    I’m gone for the next three days, heading to Crested Butte, CO to ski. I enjoy skiing and this is the time of year I try to use vacation and get out with my wife.

    We’ve been missing travel, and missing skiing. Some of our efforts recently haven’t gone great, though our place is Keystone is starting to get rentals. That’s a good sign. Since using our place would reduce our revenue, we decided to try a new place and just book lodging.

    We’ve never been to Crested Butte. When I checked lift ticket reservations, they were available, and there was a lodging sale. So we decided to book a few days up there.

  • Daily Coping 3 Mar 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 make uninterrupted time for your loved ones.

    I have less of these now, with all the kids away from the house. However, my daughter has called a few times to chat. Often she takes time between classes, or shortly thereafter, but those are not always good times for me. I’m often working then.

    However, I’ve made it a point to stop, not multi-task, and walk away from my desk when she calls. Focus on her, and enjoy the time.

  • Using Dynamic SQL

    There are many ways that you can structure your T-SQL code to solve complex problems. Throughout my career, I’ve learned different ways, and also some patterns to avoid. However, those change over time. For example, there was a time when heavily loading tempdb caused issues in the v6 era. As a result, I tried to avoid using them. These days, I’d consider them a good option to think about.

    One of the techniques that I see people trying often is Dynamic SQL. This is where you don’t write the code directly, but you write code that will put together a string of code to execute, and then you call this with EXECUTE() or some other mechanism to get your results.

    There are places where you might find Dynamic SQL useful. I saw an article from Erik Darling recently that gives you some situations where Dynamic SQL can help. These are often situations where performance is worse with a bunch of conditional code that is jumbled together. Separating out code into different procs or functions can help here, but that becomes a maintenance headache in many ways.

    Dynamic SQL isn’t something to just try without thinking carefully about the ramifications. SQL Injection is a real concern, though you can mitigate the risk with some careful coding. However, you need to be careful how you structure code, and don’t just concatenate strings together and execute them. Read up on good practices from others, and ensure you test your code thoroughly. In fact, this is one place where automated testing can become important, as you learn of different injection techniques, you can add new tests to ensure your code isn’t vulnerable.

    As you work with T-SQL, it’s important to continue your education, learn how the platform and language work, how performance changes between versions, and what options are to be adopted or dropped. Becoming a better T-SQL developer takes work and practice, and it’s an area in which we should all be constant students.

    Steve Jones

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

  • Daily Coping 2 Mar 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 thank three people you feel grateful to and well them why.

    I decided to pick three people that make me think and widen my view of the world. I sent a note to each of them individually, but the gist is here:

    Rie Merritt

    I don’t get to sit and chat with Rie often, but over time, we’ve had some interesting chats. I really appreciate the way she has passion and advocacy for various aspects of life and work, trying to make the world better. At the same time, she’s rational and listens, willing to debate about things.

    I especially appreciate her view as a woman in the SQL Family, as her experiences, her thoughts, and more help me to see the world in a wider way.

    I’m grateful that I’ve known her.

    Andy Mallon

    Andy and I have run into each other at various events. He’s been a fun person, full of excitement and passion. He’s compassionate and has supported many causes that are also important to me.

    He’s also very opinionated and very strong willed, especially around diversity and inclusion. We don’t always agree, but I do think he makes many valid points, and I think the world is better for having him in it, as is the SQL Family.

    I am grateful for all the words we’ve exchanged.

    Steve Rezhener

    Steve runs the LA Data Platform group and their SQL Saturday, actually Data/SQL Saturday now. Steve has been a critic and advocate for SQL Saturday for years, and he’s often pushed me on how to view events, and how they’ve been managed in the past.

    We don’t always agree, but I do appreciate his view and his passion. He helps me to remember that there are other ways to view the franchise than my own.

    I’m grateful to Steve for the hospitality in LA, and the ways he challenges me.