Tag: syndicated

  • Daily Coping 21 June 2022

    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 speak to others in a warm and friendly way.

    I’ve been traveling a lot lately. This means I’m running into lots of people I’ve never met, and a few I have. Last week I started this tip while at VSLive in Austin.

    I do remember that many people can be introverted and shy, and others are ignored. I usually try to be polite and welcoming to people, even when I’m introverted and tired. Specifically, I made it a point to be polite (please, thank you, excuse) me to staffers at the hotel. I’ve done those jobs, and I appreciate how they can be stressful.

    I also made an effort across just two days to greet, smile, and be polite to other attendees. Hopefully setting a good example of what I like to see from others at events, where they have opportunities to network.

  • Daily Coping 20 Jun 2022

    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 send a positive message to a friend who needs encouragement.

    I get these sometimes from friends, and I love them. I also try to remember to do this.

    I had a friend that had to go through a tough time with a family member being sick recently. Everything is fine, but I know the aftermath of this and trying to get back to normal is hard. I made it a point to reach out every day or two for a few days to check on them and just offer encouragement.

    You could do that randomly as well, even if someone isn’t needing encouragement. Just let them know you are thinking of them.

  • New in SQL Server 2022 – Generate_Series

    One of the new language features added in SQL Server 2022 is the GENERATE_SERIES function. This allows you to generate a

    SELECT * FROM GENERATE_SERIES(start=1, stop=7)

    This gives me a simple sequence of numbers in a result set, with the column header, value.

    2022-03-31 14_57_20-SQLQuery3.sql - ., 51433.sandbox (sa (80))_ - Microsoft SQL Server Management St

    Let’s take this code from Dwain Camps article, Tally Tables in T-SQL:

    DECLARE @S VARCHAR(8000) = 'Aarrrgggh!';
    SELECT value, s
    FROM
    (
         -- Always choose the first element
         SELECT value=1, s=LEFT(@S, 1) UNION ALL
         -- Include each successive next element as long as it’s different than the prior
         SELECT value, CASE
             WHEN SUBSTRING(@S, value-1, 1) <> SUBSTRING(@S, value, 1)
             THEN SUBSTRING(@S, value, 1)
             -- Repeated characters are assigned NULL by the CASE
             END
         FROM GENERATE_SERIES(start=1, stop=100)
         WHERE value BETWEEN 2 AND LEN(@S)
    ) a
    -- Now we filter out the repeated elements
    WHERE s IS NOT NULL;

    Now the original code has a CTE that generates the series, or tally table. I’ve replaced that with GENERATE_SERIES. The code works as expected, which in this case is to remove repeating characters.

    2022-03-31 14_58_21-SQLQuery3.sql - ., 51433.sandbox (sa (80))_ - Microsoft SQL Server Management St

    SQL Server 2022 is now out in preview and I’d urge you to give it a try. This is a neat new feature, and it does provide more standard code than the variety of ways I see people building tally tables.

    I haven’t tested performance, but I am hoping it does as well as cross joining system tables or using a CTE.

  • Daily Coping 17 Jun 2022

    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 spend a few minutes looking at a piece of art and think about what you enjoy about it.

    I haven’t ever been a bit art fan. However, I saw an ad for the Van Gogh Experience in 2021 and mentioned that it looked interesting to my wife. She bought tickets and last fall we went. It was cool, and hard to describe, but essentially a movie version of many pieces being drawn on walls and evolving.

    I really enjoyed it, and since then, I’ve kept a Van Gogh painting as a background on my desktop, rotating with a family photo or two and my coping calendar.

    Right now, I have this piece on my desktop:

    tlA9gj4-van-gogh-desktop-wallpaper

    This reminds me of Europe, in old time, when we have life going on. People working, a horse and carriage on a daily journey of work, perhaps going to load up the work from people washing clothes in the river.

    Perhaps because I do most of the laundry, I’m glad I don’t clean clothes in a river, but at the same time, there is a level of pleasure from accomplishing something manual like this.

    I’m also amazed by the brightness of colors and how they paint a picture, despite being very different in similar places. The bricks of the bridge having yellowa, greens, oranges, even a bit of blue. It’s like a vivid reminder of the richness of life. I love the way m imagination creates the details that are blurry in this style of painting. I think I see something else in the water each time I look. Sometimes it’s the plants, sometimes I see fish. Sometimes I think there are more plants than others. Sometimes I can imagine the oil slicks or pollution I see in many rivers on my travels because of boat engines.

    I find myself enjoying taking a moment on these paintings, thinking how Van Gogh’s life might be different and similar to mine.