Category: Blog

  • Daily Coping 31 Aug 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 give others the gift of your full attention.

    We have a team meeting every couple weeks. We update each other on things that have changed, but it’s not a heavy concentration meeting. However, I’ve been making it a point to close applications on other screens, put my hands on a cup of coffee or glass of water, and just pay attention to others.

    It’s not always that interesting and it was a struggle at first, but I am working to be more present for the time I spend with others, rather than multitasking in some way.

  • Delaying Code Execution with Waitfor–#SQLNewBlogger

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

    One of the rarely used commands for me is the WAITFOR command. This is a command that intentionally introduces a delay in the execution of your code. I sometimes use this when I need to pause code for a brief time, but I never remember how this structure works.

    Hopefully this quick post helps me remember this in the future.

    WAITFOR

    This command does what it says; it waits for something. You have two choices here in what to wait for: a period of time or a specific time. The structure of the command is:

    waitfor <type> <time>

    The type can be either of the keywords TIME or DELAY. I often use DELAY, which is a period of time to wait for. When you use TIME, the execution stops until that specific time of day.

    As an example, if I want to pause code for 5 seconds, I use this:

    WAITFOR DELAY ‘00:00:05’

    If I run this in SSMS or ADS, the query time for this will be 5 seconds. The default is ‘hh:mm’, so remember that if you want seconds, you need to include the hours and minutes.

    For time, the parameter is a datetime format, so enter this as the time you would want to start code execution again.

    Practical Usage

    The main place I used this recently was in this code:

    EXEC msdb.dbo.sp_start_job @job_name = ‘Second Job with Two Errors’, @step_name=’Fourth Step’
    WAITFOR DELAY ’00:00:02′

    I was testing some job tracking, and needed a job that failed. It usually runs in less than a second, but without the delay, sometimes the failure isn’t picked up from the job history table.

    This is the type of place, often in testing or in some dependent process, where I want a delay.

     

    SQLNewBlogger

    This post too my about 10 minutes to write. I couldn’t remember how WAITFOR works, but SQL Prompt helped. As I worked through my testing, I stopped and took 10 minutes to write this up.

    You can do the same thing. Show your example, and how you use it. Be creative and impress someone who might read your blog before they interview you.

  • Daily Coping 30 Aug 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 donate some items to a charity.

    I know this happened a lot last year. The local Goodwill stopped taking some things because so many people have up some of their possessions.

    I’ve had a few things ready, so I’m giving away some bikes that still work, but the kids don’t ride anymore. I’m also giving away a few more dress clothes. I haven’t worn in years, they’re in good shape, and they don’t fit me. I rent suits now.

  • Date Slippage in the Tesla Model Y Order Process

    This is part of a series that covers my experience with a Tesla Model Y. If you are thinking of ordering one, I’ve got a referral code. You get 1,000 free Supercharger miles and so do I. Use: http://ts.la/john92950

    I ordered a Tesla Model Y in May 2021. I wrote about the decision a bit, and as of this date, I haven’t gotten the car yet. When I took the test drive, the salesman noted that cars would likely be delivered in August then. Maybe July, but likely August to September. I ordered that night, May 21.

    I didn’t track this explicitly, but the first time I checked on Jun 1, I had a month range. Here is the summary of what I’d seen as the possible delivery dates. The first date is the day I checked.

    • May 22 – July-Sept
    • Jun 1 – Aug-Sept
    • Jul 6 – Aug 14-Sep 3
    • Jul 18 – Aug 15 – Sep 4
    • Jul 23 – Aug 18 – Sep 10
    • Jul 30- Aug 21 – Sep 10
    • Aug 4 – Aug 26 – Sep 15
    • Aug 10 – Aug 27 – Sep 16
    • Aug 16 – Aug 26 – Sep 15
    • Aug 18 – Aug 27- Sep 15
    • Aug 19 – Aug 28 – Sep 16

    Mostly things have slipped, but last week things improved by a day. I can’t imagine how hard it is to predict these days, given a large manufacturing environment. I do like seeing the updates, and I don’t think they need to keep emailing me. It’s a few minutes to check if I want to know.

    As I get closer, I keep checking daily. I’m out of town this week, so having it slip to Aug 30 at the earliest is fine.

    When I checked on Jun 1, this was when I saw a story that the third quarter was sold out. When I looked at the ordering process, the estimate in the tool was October, so I was glad we’d ordered that day. Not to mention May 22 had a $500 price increase, and a few more since.

    When I started this process, delivery was November, and when I checked the date for my last post, things were delivering in December. This week I saw a note that you can’t get a Model Y in the US before 2022 right now, in mid August.

    Priorities and Changes

    One thing I’ve seen a few people note is that the higher priced models, the performance ones, sometimes will jump in line ahead of the cheaper ones. I have the lower Model Y version, the longer range one. There is no standard range one right now.

    I understand Tesla might want to get those cars out quicker, as they add more to the bottom line, but I don’t know how many they’d have to prioritize to make a material difference. I certainly do think that the Plaid Model S and Model X might get re-prioritized slightly by cost rather than order date, but I don’t really know.

    Just as likely, in my mind, is a glitch in their process and their picking the dates they send to customers.

    I don’t feel too upset that a couple week slippage has appeared from the first date. It gives me a little more time to get prepared and get money ready, as quite a bit is due at delivery. Plus I am doing some work getting my old car ready to sell.

    Other Possibilities

    I saw a Ford Mach-E recently at the gym. At first I thought it was a Model Y with a Mustang badge on the front. I walked around, and realized it was a Ford. It’s nice looking.

    20210807_090925

    If you order this, with the standard range version (230mi range), it’s 16+ weeks on the Ford site. If you want extended range, 302 miles, it’s 24+ weeks. That’s longer than Tesla.

    I got a mailer about the BMW Electric cars, and that caught my eye. They don’t deliver until next summer.

    I considered a Polestar 2, but I was a bit concerned that it’s another 1.0 car, and not a lot of charging infrastructure, plus lower range. Those say delivery in September, which is good.

    Ultimately, no one has a track record here, and as I’ve watched the Bolt, the Leaf, Tesla, and other cars, it takes time to work out bugs. I think especially with the software, which is what I’m most concerned about.

    Summary

    I’m camping this week, so even if the car were available Aug 26, I couldn’t get it until next week. I’m hoping I get an update sometime while I’m in South Dakota that gives me a specific date when I can go pick it up. Hopefully this is the week of Aug 30 or Sep 6.

    I’m certainly excited and ready.

    Video versions of these posts on My Colorado Tesla Experience Channel. You can see all of these posts by following the Tesla tag.