Author: way0utwest

  • Daily Coping 17 Dec 2020

    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 be generous and feed someone with food, love, or kindness today.

    My love language is Acts of Service, and I do this often, preparing things for the family when I can. Recently I asked my son what he’d want for dinner. He comes down once or twice a month from college for a few days, and I try to ensure he enjoys the time.

    His request: ramen.

    I put this together for him, and the family, last Friday night.

    20201207_190958

    The sushi I bought, because that’s something he enjoys, and I’m not nearly as good as some local chefs.

  • No Scalars with JSON_QUERY–#SQLNewBlogger

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

    I started to dig into JSON queries recently, and as I continued to experiment with JSON, this struck me as strange. Why is there a NULL in the result?

    2020-12-04 14_43_02-SQLQuery3.sql - ARISTOTLE_SQL2017.Compare2 (ARISTOTLE_Steve (58))_ - Microsoft S

    The path looks right. This appears to be somewhere I ought to get a result back. As I looked up the JSON_QUERY documentation, and it says I get an object or array back. I’d somewhat expect that position, while containing a single value, could be seen as an object of

    {“setter”}

    The fact that I need to know I have a single value here seems like poor design. If the document changes, perhaps someone might enter this:

    DECLARE @json NVARCHAR(1000)
         = N'
      {  "player": {
                  "name" : "Sarah",
                  "position" : "setter, DS"
                 },
        "team":"varsity"
      }
    ';

    In this case, a JSON_VALUE would fail, while a JSON_QUERY wouldn’t work in the first example above. This means that I need to modify my code based on documents.

    I don’t like this, but I need to know this, so if you work with JSON, make sure you know how the functions work.

    SQLNewBlogger

    While writing the previous post, I changed one of the function calls and got the NULL. I had to fix things for the other post, but I kept the query and then spent about 10 minutes writing this one to show a little thought into the language.

    You can easily take something you are confused about, made a mistake doing, or wonder about and write your own post.

  • Your User Group Goals

    Many of you reading this piece have likely been to a user group at some point in your career. Some may go every month, some may go a once or twice annually , and some may not have been for years. I also know some of you don’t have a group in your area, or perhaps not enough people for a SQL Server group, but I would bet if you are working in technology, there are enough people to have some sort of technology group, perhaps even an online book club.

    Recently I was speaking with Andy Warren about his group in Orlando. He’s preparing to turn over leadership of the group to others, and he’s actually looking for comments on the docs he’s put together. I’d urge you to take a moment and think about your group and how you want it structured and check out what Andy has done. He’d appreciate comments on his effort, whether you are in leadership or just show up at meetings.

    Our discussion, however, was on goals. What goals are appropriate for the group, and what guidelines should he leave for others. He’s tended towards goals of “more”, meaning more people touched, more attendance at meetings, more events. I’ve tended to aim for more ensuring you keep people interesting, inspired, and with some engagement, but not worried about size.

    Whether you are in the leadership of a group, just an attendees, or wish you had a more interesting group of technical people to meet with regularly, what do you wish your group would accomplish next year? Are there things that matter to you for an organization outside of work that might help your career? Take a minute to think and leave me a comment today.

    Steve Jones

    Listen to the podcast at Libsyn, Stitcher or iTunes.

  • Daily Coping 16 Dec 2020

    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 listen wholeheartedly to others without judging them.

    I was talking with a friend recently and they were struggling with their workload. They complained about the amount of work, and the dates things were due, while also noting they were struggling to focus and get things done.

    In the past, I’d have suggested something, or maybe questioned how they were planning on doing the work. I might even try to get them to see where they weren’t taking advantage of the time they did have and resources available.

    In other words, I would have been my typical Type-A, let me solve your problems person.

    Instead, I did none of that. I sympathized, empathized, and wished them luck, while asking if I could help.

    Sometimes I think venting and talking aloud helps someone sort through their thoughts, and my wife has helped me to learn how to be a sounding board without offering my own input.