-->
SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 

Bert Wagner

Bert Wagner is a Business Intelligence Developer at Progressive Insurance. He enjoys solving challenging data transformations with T-SQL and optimizing for query performance. In addition to BI development, Bert loves building ASP.NET MVC web apps and building Internet of Things projects.

Importing GeoJSON Earthquake Data Into SQL Server

A significant portion of Yellowstone National Park sits on top of a supervolcano.  Although it’s not likely to erupt any time soon, the park is constantly monitored for geological events like earthquakes.

This week I want to take a look at how you can import this earthquake data, encoded… Read more

0 comments, 174 reads

Posted in Bert Wagner on 16 January 2018

I Have A SQL Login – Why Can’t I Connect?

This post is a response to this month’s T-SQL Tuesday prompt created by Arun SirpalAdam Machanic created T-SQL Tuesday as a way for SQL users to share ideas about interesting topics. This month’s topic is “Your Technical Challenges Conquered”.


DBA Skills 101: SQL Logins

While writing last… Read more

0 comments, 176 reads

Posted in Bert Wagner on 9 January 2018

A Better Way To Script Database Objects

Photo by Andy Beales on Unsplash

Happy New Year! My New Year’s resolution for 2018 is to help you become a better SQL developer.

I want to start off with that today by showing you a much better way to generate database object change scripts.

Prefer video?  Watch this week’s… Read more

8 comments, 2,806 reads

Posted in Bert Wagner on 2 January 2018

SQL and NOT SQL: Best of 2017

Photo by Rick Meyers on Unsplash

With only a few days left in 2017, I thought it would be fun to do a year in review post.  Below you’ll find some of my top 5 favorites in a variety of SQL and non-SQL related categories.  Hope you enjoy and I’ll… Read more

0 comments, 135 reads

Posted in Bert Wagner on 26 December 2017

How To Create Multi-Object JSON Arrays in SQL Server

Recently I was discussing with Peter Saverman whether it would be possible to take some database tables that look like this:

And output them so that the Cars and Toys data would map to a multi-object JSON array like so:

Prefer visuals instead of text?  You can watch this week’s… Read more

0 comments, 395 reads

Posted in Bert Wagner on 19 December 2017

Reducing the Number of Reads in Your Queries

“A-Bridged” – reducing reads – get it?  I’m sorry you’re reading this.  Photo by Jamie Street on Unsplash

In last week’s post, we went over how one of best ways to improve query performance was to reduce the number of reads that your query has to do.

Less reads typically… Read more

0 comments, 40 reads

Posted in Bert Wagner on 12 December 2017

Learning Through Blogging and Speaking

This post is a response to this month’s T-SQL Tuesday prompt created by Mala Mahadevan. T-SQL Tuesday was created by Adam Machanic and is a way for SQL users to share ideas about interesting topics. This month’s topic is Setting Learning Goals for 2018.


Prefer watching instead of… Read more

0 comments, 26 reads

Posted in Bert Wagner on 12 December 2017

How to use Statistics IO to Improve Your Query Performance

SQL Server’s STATISTICS IO reporting is a great tool to help you performance tune queries.
Usually the goal of performance tuning is to make your query run faster.  One of the easiest ways to get a faster query is to reduce the amount of data a query is processing.  STATISTICS…

Read more

2 comments, 19 reads

Posted in Bert Wagner on 5 December 2017

My Favorite SSMS Shortcut (After Copy/Paste)

Photo by Abhishek Desai on Unsplash

If there’s one keyboard shortcut I use more than any other (with the exception of copy and paste) it would be the ALT + highlight multi-line edit/block selection shortcut.

Let’s take a look at three ways the ALT + highlight shortcut lets you work… Read more

1 comments, 25 reads

Posted in Bert Wagner on 28 November 2017

Does The Join Order of My Tables Matter?

Photo by pan xiaozhen on Unsplash

I had a great question submitted to me (thank you Brandman!) that I thought would make for a good blog post:

…I’ve been wondering if it really matters from a performance standpoint where I start my queries. For example, if I join from A-B-C,…

Read more

1 comments, 48 reads

Posted in Bert Wagner on 21 November 2017

How to Search Stored Procedures and Ad-Hoc Queries

Photo by Louis Blythe on Unsplash

Have you ever wanted to find something that was referenced in the body of a SQL query?

Maybe you need to know what queries you will have to modify for an upcoming table rename.  Or maybe you want to see how many queries on… Read more

0 comments, 37 reads

Posted in Bert Wagner on 14 November 2017

4 Common Misconceptions About SQL Injection Attacks

Photo by Jaanus Jagomägi on Unsplash

Interested in learning more about SQL injection attacks, including how to prevent them?  Attend my online webcast on Tuesday November 14, 2017 at 1PM Eastern at the PASS Security Virtual Group.

SQL injection continues to be one of the biggest security risks that… Read more

0 comments, 37 reads

Posted in Bert Wagner on 7 November 2017

The Quickest Way To Get SQL Command Help

Formula One …. F1 …. Photo by Jp Valery on Unsplash

Every once in a while I discover a SQL Server Management Studio trick that’s apparently been around forever but is completely new to me.

Today I want to point out one of those features that had me thinking “how… Read more

0 comments, 40 reads

Posted in Bert Wagner on 31 October 2017

10 Questions To Spark Conversation At Your Next SQL Event

Photo by rawpixel.com on Unsplash

Here’s a word for word transcription of a conversation I’ve had a hundred times over:

“Hi I’m Bert.  What do you do?”

“I’m ____ and I’m a SQL developer.”

“That’s cool, me too.”

*crickets*

*I look down at phone because I don’t know what to…

Read more

2 comments, 29 reads

Posted in Bert Wagner on 24 October 2017

How to Make SQL Server Act Like A Human By Using WAITFOR

Photo by Fischer Twins on Unsplash

You probably tune your queries for maximum performance.  You take pride in knowing how to add indexes and refactor code in order to squeeze out every last drop your server’s performance potential.  Speed is usually king.

That’s why you probably don’t use SQL Server’s… Read more

0 comments, 25 reads

Posted in Bert Wagner on 17 October 2017

How NOLOCK Will Block Your Queries

Photo by James Sutton on Unsplash

Note: the problem described below applies to all SELECT queries, not just those adorned with NOLOCK hints.  The fact that it applies to NOLOCK queries was a huge surprise to me though, hence the title.

Lots of people don’t like NOLOCK (i.e. the read… Read more

1 comments, 33 reads

Posted in Bert Wagner on 10 October 2017

3 Tips You Need To Know When Using PowerShell with SQL Server

Watch this week’s interview with Drew on YouTube.

Have you ever had to perform repetitive tasks in SQL Server?

Maybe you’ve had to manually verify backups, script out all of a server’s logins/groups/permissions, or refresh a dev environment with data.  With PowerShell, you can automate all of these manual… Read more

0 comments, 28 reads

Posted in Bert Wagner on 3 October 2017

Clustered vs Nonclustered: Index Fundamentals You Need To Know

Photo by Patrick Tomasso on Unsplash

How many times have you known that adding an index would improve query performance but you weren’t exactly sure which type of index to add?

This happened to me all the time in my first few years (and maybe an extra year or two… Read more

0 comments, 28 reads

Posted in Bert Wagner on 26 September 2017

How To Make Your Queries Perform Like They Used To

Photo by Chad Kirchoff on Unsplash

Prefer watching on YouTube

In the ideal world, you fully test how your SQL Server will handle upgrading to the latest version.  You’re able to catch and mitigate any performance surprises early on.

In the real world, you might not be able to… Read more

0 comments, 23 reads

Posted in Bert Wagner on 19 September 2017