Tag: syndicated

  • Creating a New Sequence–#SQLNewBlogger

    I wrote about sequences in an editorial recently and decided to start using them. Creating one turned out to be surprisingly easy.

    I had a table I’d been logging some data in, with a PK, but no natural key or identity bound to the table. Instead, this was low volume (1x per day) and I just manually adjusted the PK value.

    I decided to create a sequence. As I did this, I found it interesting and consulted the BOL page for some ideas on the options.

    The first part is simple. A name and datatype.

    CREATE SEQUENCE dbo.MyKey as INT

    That makes sense. Next, I need a starting value. In my case, I had 7 values in the table, so I added this:

    START WITH 8

    That gets me what I need. The last part I added was the INCREMENT BY clause. In my case, 1 works fine. My code:

    2020-05-09 09_33_59-SQLQuery7.sql - ARISTOTLE_SQL2017.way0utwest (ARISTOTLE_Steve (56))_ - Microsoft

    The last query is how you get the next value. The NEXT VALUE FOR phrase can be used in various places, but that’s for another day.

    If I needed to bind values, I could use the MINVALUE or MAXVALUE, which I’ll look at in a different post. I could also control caching and cycle values if I needed to.

    SQLNewBlogger

    I actually started a post on binding this to a column and then decided to add this short post in about 5 minutes.

  • An All Star Lineup for EightKB

    An online conference is coming on June 17, 2020 that is full of high level content. It’s the type of event that I think contains information relatively few people will truly understand and use, but most will find interesting. This is EightKB, a SQL Server Internals Conference featuring these speakers:

    • Bob Ward
    • Erin Stellato
    • Joey D’Antoni
    • Pam Lahoud
    • Argenis Fernandez

    That’s quite an all start lineup of speakers. Levels of content range from 400 to Insanity.

    This is put on by Andrew Pruski (T|B), Mark Wilkinson (T|B), and Anthony Nocentino (T|B).

    If you want an entertaining day of content, sign up today and enjoy the ride.

  • Daily Coping 3 Jun 2020

    I’ve 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.

    Today’s tip is find three good reasons to be hopeful for the future.

    Reason 1 – Most people are recovering

    One of the things that I haven’t seen often shown in various reports on data is how many people have recovered from the Coronoavirus. I know the more conservative people that I see post will point out that most people recover, and that’s true. It’s also true that a lot of people haven’t, and 99% recoverability is still a scary number. I coach kids on tournament days where there are often 100 people between athletes and coaches. If one of them died every tournament, I’d be devastated.

    However, many people are recovering and that’s good news. I have no idea of this means some level of immunity, some herd protection, or anything else, but I am hopeful that this will mean the world will start to progress forward at some point.

    Reason 2 – My family is coping

    Selfish, but as we’ve gone through this, some of us leaning on each other, and getting closer, we’ve also been healthy and managed to find ways to still enjoy life. The hopeful thing for me is that we still have hope.

    Reason 3 – I’ve Learned to Appreciate More of Life

    My life is chaotic, and on the go. I flew over 100,000 miles in the air last year, spent many nights away from home, and enjoyed my adventures, many of them with family. I love the gym, I love coaching, and more.

    These last few months have taken much of that away, with us mostly resigned to being at home and learning to be there all the time. There have been some hard days, and some difficult days for me, but I’ve learned I can cope and find ways to enjoy the changes in life.

    I’m hopeful that no matter how the world looks for the rest of my life, I’ll find ways to enjoy it.

  • Daily Coping 2 Jun 2020

    I’ve 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.

    Today’s tip is to think about how your actions make a difference for others.

    We are all in this together. We may not agree, and we certainly may react and go about our days differently, but this pandemic has affected everyone and we are all living in a world that I wouldn’t have imagined on Jan 1.

    I certainly could think about what I do that helps people. Part of this tip series and the Community Circle is that we are trying to help people.

    However, I want to take something from Grant’s blog (Be Kind). I’ve written a few times about the topic, but we are all experiencing things differently. We have different circumstances, different ways our day has gone, different moods and emotions, different challenges. Or the same things at different times.

    I’ve started to think more about my actions and how they might negatively impact others. I try to be more empathetic, understanding, and react less. As I write this, it’s just days after the death of George Floyd, a few more days since Ahmaud Arbery. I see lots of reactions from many people, and I find myself upset, saddened, angry, and more. I could be in that situation, and I’ve been careful and lucky not to be in those situations.

    However, I also know my actions might not make anything better, certainly not for most people I might engage with. I don’t need to add more discord to this situation, and I certainly could make things worse for others.

    I don’t mean to focus on these situations, but on the main interactions I have with people at work, in this limited society, even with family. My roller coaster of emotions and coping can affect others, and I try to remember that. I try to temper myself and aim to be pleasant, respectful, and understanding.

    More and more, I just try to follow Wheaton’s Law. It’s not that hard most of the time, and when it is, it’s worth making the effort.