Tag: syndicated

  • Daily Coping 21 Jan 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 get outside and notice 5 things.

    In winter I tend not to do a lot outside. Unless I’m skiing. I don’t do enough hiking, unlike TJay Belt, who I see is outside most weekends. I like yoga, and I coach kids inside.

    This is a good reminder for me to go outside and do something. It’s been un-seasonably warm in Denver, and with my wife gone for a couple days recently, I had to go outside with my daughter and help with horse chores. I noticed these things:

    1. We have a lot of horses.
    2. It is windy out here, even a little bit blows hay in my face as I’m feeding
    3. It’s a long way ar0und the property to feed, even while driving
    4. The sky is still vast and large, even as more houses are being built on the horizon
    5. The drought in Colorado is bad.

    Not so much nature, but things that stood out to me.

  • Daily Coping 20 Jan 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 eat healthy food that nourishes you today.

    My wife has been on a bit of a diet, actually a few through the last half of 2021. After nearly two years of pandemic life, in which I gained a good COVID fifteen, I decided to join her. It’s a simple set of meal plans that have me eating better, and less, which is the most important part. Mostly it’s a routine of days where I have:

    • small breakfast – either low or medium carb, depending on the day. sample, two eggs and two slice of turkey bacon or oatmeal with blueberries
    • mid morning protein smoothie – usually a little protein powder, some frozen fruit and water/ice. It’s not a great smoothie, but it quells some hunger.
    • smaller lunch – usually a salad or wrap
    • mid-late afternoon protein smoothie – usually a little protein powder, some frozen fruit and water/ice. It’s not a great smoothie, but it quells some hunger.
    • mid-sized dinner – low or medium carb, which has been chicken with vegetables or turkey tacos (limited shells).
    • an apple or similar snack some evenings.

    Today is a low carb day, so eggs and bacon, a couple smoothies, salad with chicken, and chicken with vegetables. It’s not that satisfying, but nearly two years of indulgence has me trying to pay some penance back.

    Also:

    • No alcohol (since Dec 31)
    • No cream in coffee
    • Limited diet soda (I need some indulgence)
    • No dessert
    • No pre-packaged food, other than the oatmeal.

    I feel better, and I’m losing some weight, which is the point of all of this.

  • Creating a new User-Defined Data Type–#SQLNewBlogger

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

    I ran across a question on user-defined data types, which I hadn’t worked with in a long time, so I took a minute to investigate. I wrote this post about an interesting language item.

    User-defined table types let you add a new type that can be used anywhere you would use a base, or normal, data type. This means if I want to have a type of US zip codes, perhaps limiting the base zip to 5 numbers, I can create a type that is limited to 5 digits.

    If I want to create a new user-defined table type, I’d have thought I did something like this:

    CREATE TYPE dbo.USZipCode AS VARCHAR(5)

    However that doesn’t work.

    2022-01-06 10_20_55-SQLQuery1.sql - ARISTOTLE.sandbox (ARISTOTLE_Steve (58))_ - Microsoft SQL Server

    The AS structure is used in many places, but not here. Instead, we use a FROM structure. This means I’d do this:

    CREATE TYPE dbo.USZipCode FROM VARCHAR(5)

    This gives me a type I can use in CREATE TABLE statements, stored procedures, and more. Anywhere I’d use the varchar(5), I could do this instead:

    CREATE TABLE dbo.AddressTable
    ( AddressID INT NOT NULL
    , AddressValue VARCHAR(100)
    , AddressZip USZipCode
    )

    This let’s me use a type that is more intuitive, I guess. I don’t find these that useful in most places. In fact, it’s a little confusing. If I were a new developer, is this a 5 or 9 (or 10) digit field? Is it numeric or string? It’s not easy to determine this. I don’t find these that useful.

    SQL New Blogger

    I was doing other work, but I saved a bit of code and then spent about 10-15 minutes to write up this post. This one shows less about what I learned, and more about what I think.

    Always good to show to a prospective interviewer.

  • Daily Coping 19 Jan 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 connect with someone near you, share a smile or chat.

    One of the things I learned early in life is that being friendly isn’t hard. Waving, smiling, saying “hi”, aren’t things I always see in the city, but in suburban and rural areas, this happens more.

    I also find myself being a little annoyed with myself if I’ve made eye contact and not been the first one to be friendly.

    I had a massage recently, and the masseur wanted to talk, so I engaged and spent time getting to know him. I smiled, looked at him (as best I could), and listened to his thoughts. It was an interesting discussion, and even when I might disagree with something, I resisted an impulse to argue and instead just kept a pleasant chat going.

    Surprisingly, I enjoyed the hour.