Category: Blog

  • Daily Coping 18 Oct 2022

    Today’s coping tip is to share an important goal with someone you trust.

    I’m not sharing an important goal here. Honestly, some of the things that are important to me make me more vulnerable and I really don’t want to hear criticism, comments, or even cheering. Until I move forward more, both mentally and in actuality, those things aren’t helpful for me.

    Instead, I’m sharing something that I want to accomplish with a close friend and my wife. Those are the two people that I trust to listen, just listen. I don’t need them to push me or encourage me. Just to share something that will help me think things through for myself.

    I started to add a daily coping tip to the SQL Server Central 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.

  • An Update to Skipping the Leading Digit in T-SQL–#SQLNewBlogger

    There was an interesting question in a forum, which I wrote about before. How do you skip the leading digit in a numeric value. I had looked at a UNION, but someone had a better suggestion, so I’m adding to the post.

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

    Another Predicate

    In the previous post, I used a <> and then a > and < with a UNION. Howver, someone noted that NOT BETWEEN is an option. I could rewrite the query this way:

    SELECT *
     FROM dbo.Room AS r
     WHERE room NOT BETWEEN  200 AND 299
    

    This gives me the same result:

    2022-10-05 14_32_43-SQLQuery6.sql - ARISTOTLE.sandbox (ARISTOTLE_Steve (61))_ - Microsoft SQL Server

    This also results in a seek.

    2022-10-05 14_33_30-SQLQuery6.sql - ARISTOTLE.sandbox (ARISTOTLE_Steve (61))_ - Microsoft SQL Server

    The BETWEEN or NOT BETWEN is sargable, meaning we can use an index to find those values that fall into this ordering and exclude them.

    Worth remembering BETWEEN when writing queries for ranges.

    SQL New Blogger

    An update to my post, showing a better way, showing I am happy to take advice from others, and I can improve code. This is a skill that employers need, especially when teams need to become more consistent with coding when working together. Showing you can adapt and grow is a good skill.

    You could write a simple blog like this that shows how you might change some code you wrote in the past. I bet it takes less than 30 minutes.

  • Daily Coping 17 Oct 2022

    Today’s coping tip is to make progress on a project or task you have been avoiding

    Most of the things I do for work are spent looking in the future. I’m always trying to prep and prepare things ahead of time because the difficulty of getting work done today for tomorrow is hard. Especially creative work.

    I’m writing this a week early, because, well, I needed to tackle something. I had been invited to be a part of a Learning Pathway at the Data Community Summit 2022. I knew this, but since I didn’t submit and plan for this, it wasn’t something I was that excited about. I enjoy the topic and talking, but I wouldn’t have picked this overview one.

    So I have been procrastinating and delaying working on this, but I realized I needed to get it done. I buckled down and took an afternoon where I worked on the deck, outlining the flow. Then another day to flesh out details and practice a first run through.

    Slow progress, but it got me moving.

    I started to add a daily coping tip to the SQL Server Central 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.

  • Data Points From Life

    I spent a week in Hawaii with my wife, which was wonderful. Relaxing, recharging, and a vacation with almost no plans. We did things somewhat day by day, which we often do, but many days had no plans at all. Sitting on the beach reading, or floating in the ocean were a good way to relax.

    At one point my wife wanted to know about some data in her life. She asked about how many trips we’d taken together this year (8 as of then). She also noted that with this visit to Hawaii, she’s now visited 49 states. That’s more than me.

    It got me thinking about some data in my life. I track a few things, but I decided to run a few queries and note some lifetime things:

    States Visited:46 (though 3 more I haven’t spent a night in the state)

    Countries Visited: 23

    Cars owned: 31

    Blogs posted professionally: 3,524

    Editorials Written: 2,440

    Years running SSC: 21

    Years speaking: 19

    Talks given (since 2008): 404

    Miles flown on United: 830k

    Longest running streak: 1564

    Probably a lot more to track and more I can log. I’m slowly assembling data about my life into a database, mostly for fun. Hopefully I’ll get more organized and use it in a few presentations.