Republish: The Digital Twin

Hopefully I’m in the UK today, and I’m cleared to travel. This is time in the office and some recording for the PASS Data Platform Community Summit, so you get a republish of The Digital Twin.

Posted in Editorial | Tagged | Comments Off on Republish: The Digital Twin

Daily Coping 13 Oct 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 start with the most important thing on your to-do list.

I’m in the UK today, so my to do list is what the company needs. However, I am actually writing this before I leave, thinking about fall life in Colorado.

As winter approaches, we have a lot of things that need to get completed before the ground freezes and weather gets bad. It’s not often really bad, but it is more difficult to work during the short days, in chilly weather, and with other commitments. My current list is, in no order:

  • get the pastures cut (mowed)
  • blow out sprinklers
  • use or drain gas in mowers
  • clean out the shed to get a mower in for the winter
  • recharge/replace the generator battery for the house
  • rebuild the generator shed for the riding arena
  • paint some spots on the house
  • paint the master bathroom
  • do some maintenance on the BMW
  • change the Chevy oil
  • Change oil in the UTV and ATV on the ranch

There are probably a few other things I’ve forgotten, but these are the main ones. I’ve slowly masked and painted a little some nights, and I’ve been trying to work on the pastures. The recommendation from the state agriculture board is cut early in spring or late in fall. I missed spring, so I started in September mowing. That’s about 40 hours of work.

However, one thing I need to get done at the top of the list is close the sprinklers for the winter. It’s been warm in CO, so I haven’t been worried, but with a trip overseas, I can’t leave this. I went out and bought a air connector for the new pressure valve this weekend and then blew out the lines.

One thing to cross off for winter.

Posted in Blog | Tagged , , | Comments Off on Daily Coping 13 Oct 2021

T-SQL Tuesday #143 – Short Code

T-SQL-Tuesday-LogoI’m late, but I wanted to get this out. I started the post, then got distracted with travel to Europe late last week.

In any case, this month the host for T-SQL Tuesday is John McCormack, with his invite to write about short code examples. It’s a good technical invite, and one that immediately got me thinking about things I do often.

If you haven’t ever tried a T-SQL Tuesday, set up a blog and put out a post on the topic, this week or whenever you read this.

Snippets

I work for Redgate Software, though I’d likely be using SQL Prompt no matter what. I was never thrilled with native intellisense, but SQL Prompt has been great. One of the things I like most about Prompt are the snippets, which let me insert code with a few keystrokes.

Here’s a quick example. If I type “” in SSMS, I see this:

2021-10-13 10_52_32-CandidateList

Prompt detects this as a snippet first, then has other matches. I can hit Tab, and I’ll get this:

2021-10-13 10_52_46-CandidateList

I get a quick “top 10” from a table. Often I use SELET * for a quick look at the shape of data.

However, I can add custom snippets, and one I use often is this:

WITH myTally(n)
AS
(SELECT n = ROW_NUMBER() OVER (ORDER BY (SELECT null))
  FROM (VALUES (1), (2), (3), (4), (5), (6), (7), (8), (9), (10)) a(n)
   CROSS JOIN (VALUES (1), (2), (3), (4), (5), (6), (7), (8), (9), (10)) b(n)
)
SELECT *
FROM myTally

This is my “tt” snippet, so I can type “tt<Tab> and get this code for a tally table. This s handy in many string manipulation and problem solving situations.

If I need more than 100 rows, I can easily copy the cross join line, add a new alias, and I have 1000 rows with this:

WITH myTally(n)
AS
(SELECT n = ROW_NUMBER() OVER (ORDER BY (SELECT null))
  FROM (VALUES (1), (2), (3), (4), (5), (6), (7), (8), (9), (10)) a(n)
   CROSS JOIN (VALUES (1), (2), (3), (4), (5), (6), (7), (8), (9), (10)) b(n)
   CROSS JOIN (VALUES (1), (2), (3), (4), (5), (6), (7), (8), (9), (10)) c(n)
)
SELECT *
FROM myTally

Short, but effective code.

Posted in Blog | Tagged , , | Comments Off on T-SQL Tuesday #143 – Short Code

Redgate’s Pre-con at the 2021 PASS Data Community Summit

I was fortunate to present a pre-con at the PASS Summit alongside Kendra Little in 2019. That was the last in person event, and I really enjoyed the session. I”m not presenting a pre-con this year, but I am part of the PASS Data Community Summit keynote and also presenting a session in the Database DevOps learning pathway “A version Control primer for Databases”.

Redgate is sponsoring a pre-con with Grant Fritchey, who blogged about the Redgate pre-con, DevOps for the DBA This takes place online on Tuesday November 9. The pre-con is just $200, which is much reduced from the usual fee, and what’s even better is that all of the proceeds will be donated to Black Girls Code.

It’s a chance to learn about introducing automation into your database development process and aligning with the DevOps techniques that your applications developers use. You also can support a great charity that helps kids enter our field.

Register today and I’ll see you online next month at the Data Community Summit.

Posted in Blog | Tagged , , | Comments Off on Redgate’s Pre-con at the 2021 PASS Data Community Summit