Daily Coping 18 May 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 look around you and notice five things you find meaningful.

Easy for me. Or so I thought. I wasn’t quite sure what meaningful might me for things, but I saw the definition: “having a serious, important, or useful quality or purpose.”

Lots around here that is meaningful.

This trailer is useful and has a lot of purpose. It helps us feed every day and keeps horses healthier.

20200124_104415

This guitar challenges me, pleases me, and entertains me. It has become a part of my life.

20200428_194625_HDR

This sprayer, since repaired, helps me care for our property.

20200429_170550

I’ve never been one for many neck or face coverings. Even while skiing, I wear less than the family, but I’ve been keeping masks and bandanas in the cars. They are useful, and for now, important.

20200417_173626

Useful, but also important in that these dishes and utensils are how I feed the family and gather them together. They help me enjoy cooking, and give the family time together. Not to mention the power, joy, and necessity of the food itself.

20200328_194300

Posted in Blog | Tagged , , | Comments Off on Daily Coping 18 May 2020

SQL Prompt Fixes Missing Begin End in Procs

SQL Prompt is a fantastic coding aid, but it does more than format your code and provide intellisense. Over time, the team has enhanced SQL Prompt to also guide you along and fix some bad code that your team might write out of habit.

SQL Prompt 10.1 released recently, and one of the recent fixes is for an issue that we’ve denoted as ST003. This is an issue where a procedure is not enclosed in a Begin  End. Here’s an example.

I started writing this proc, which looks normal. I’m not sure what isn’t being qualified with the red squiggles, as the query runs fine along. In any case, I do have a green underline on CREATE PROCEDURE, which let’s me know of a style issue.

2020-05-08 10_04_59-testquery1.sql - ARISTOTLE_SQL2017.Sandbox (ARISTOTLE_Steve (58))_ - Microsoft S

If I put the cursor on this line, I see the lightbulb in the left margin. Since this is available, I know I have a possible “fix” that SQL Prompt will handle.

2020-05-08 10_06_39-testquery1.sql - ARISTOTLE_SQL2017.Sandbox (ARISTOTLE_Steve (58))_ - Microsoft S

If I click this lightbulb, I see a few options.

2020-05-08 10_06_46-testquery1.sql - ARISTOTLE_SQL2017.Sandbox (ARISTOTLE_Steve (58))_ - Microsoft S

The top one is the one I want. When I click that, SQL Prompt will reformat my query and add the BEGIN and END.

2020-05-08 10_06_54-testquery1.sql - ARISTOTLE_SQL2017.Sandbox (ARISTOTLE_Steve (58))_ - Microsoft S

This can be controversial, as the END doesn’t stop things from being included in the procedure. For example, if I do this:

2020-05-08 10_08_48-testquery1.sql - ARISTOTLE_SQL2017.Sandbox (ARISTOTLE_Steve (58))_ - Microsoft S

I get this:

2020-05-08 10_09_09-testquery1.sql - ARISTOTLE_SQL2017.Sandbox (ARISTOTLE_Steve (58))_ - Microsoft S

The CREATE PROCEDURE needs to have the batch end to stop including code. The END doesn’t do this. Make sure you have the habit of ending your procedure creation with the batch separator (GO by default).

If you haven’t tried SQL Prompt, download an eval and see what you think. If you have it, upgrade and ensure you have all the code fixes.

Posted in Blog | Tagged , , | Comments Off on SQL Prompt Fixes Missing Begin End in Procs

Taking Quarantine Holiday

On one hand I’m tired of writing about the challenges of working under this pandemic. On the other, it’s not going away quickly, and I know there are many people struggling much more than I am. I don’t in any way want to minimize the hardships that some of you are going through. I know there are many more important things than this topic for you.

That being said, I wonder what some of you are doing about holidays and vacation this year. For many of us, any plans we might have had for a flight, a cruise, even a drive, might be derailed by closures and limitations. My wife would like to take a horse and go ride at a park, but many are closed. Other plans I had are completely up in the air for now, with no real idea of what to do instead.

My employer has asked all employees to take 60% of their vacation allowance by the end of September. It’s a decision made for two reasons. One is that people need to avoid burnout and they need to get away from work, even if they can’t go anywhere. Employees need to find some way to recharge.

The second reason is that assuming the world opens back up this summer or fall, we might have a large number of people wanting to take a few weeks off during the fourth quarter. Most businesses do expect more vacation during holidays, but they can’t function well if too many people are gone at the same time. We have very liberal and generous policies at Redgate, but I’m not sure we want most of the company trying to take the entire month of December off.

I know I need to get a break, and I’m looking at starting to take some long weekends most weeks across the summer. If I can make plans with my wife, I might try to get a week or two off in a row and go somewhere, anywhere. We have a camper we can use, so if there’s a place to park, we’re thinking of just packing up and disappearing for a bit.

Let us know what you think about vacation during this pandemic. How will you handle it? Or can you just bank holiday time until next year? Maybe nothing changes for you if your normal holiday plans are still possible.

Whatever you do, be careful of burnout when your home and work lives are this intertwined. It can creep up on you if you are not careful.

Steve Jones

Listen to the podcast at Libsyn, Stitcher or iTunes.

Posted in Editorial | Tagged , | 2 Comments

Daily Coping 15 May 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 show your gratitude to people who are helping to make things better.

I go to stores and town a few times a week. Part of this is fresh food, part is needing things to keep the ranch going. Spring is often maintenance and repair time, along with regular feed items for horses.

As I go, I’ve made it a point to thank people for being open, coming to work, and even just doing their job. I’ve been tipping extra in many restaurant places, because I can afford it and I know many of others are struggling.

Small things, but I do appreciate everyone doing their jobs, however small, at a time like this.

Posted in Blog | Tagged , , | Comments Off on Daily Coping 15 May 2020