-->
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.

6 Techniques For Troubleshooting Your Code

This post is a response to this month’s T-SQL Tuesday #105 prompt by Wayne Sheffield.  T-SQL Tuesday is a way for the SQL Server community to share ideas about different database and professional topics every month.

This month’s topic asks to share a time you ran into a metaphorical… Read more

1 comments, 114 reads

Posted in Bert Wagner on 14 August 2018

Displaying Long Values in SSMS

Click here to watch this week’s video on YouTube.

I write a lot of dynamic SQL and frequently encounter variables that contain many characters:

DECLARE @LongValue NVARCHAR(MAX) = CAST('' AS NVARCHAR(MAX)) + 
N'SELECT
	''A'' AS AShortValue,
	'''+REPLICATE(N'A',4000)+''' as ALongValue
ORDER BY 1';

This variable is 4059 characters long, and… Read more

2 comments, 108 reads

Posted in Bert Wagner on 7 August 2018

Should You Use Index Hints?

Watch this week’s post on YouTube

One of the things that the SQL Server query optimizer does is determine how to retrieve the data requested by your query.

Usually it does a pretty good job, which is a great because if it didn’t then we’d be spending most of our… Read more

3 comments, 2,537 reads

Posted in Bert Wagner on 31 July 2018

Pinal Dave Helps Me Fix My Performance Tuning Problems

Be sure to check out this week’s video on YouTube.

This week I was fortunate enough to film a video in collaboration with Pinal Dave, the SQL Authority himself.  Pinal is creative, hilarious, and kind; making this video with him was A BLAST!

Although the video is a little tongue… Read more

4 comments, 159 reads

Posted in Bert Wagner on 24 July 2018

T-SQL Tuesday #104 Roundup

This month’s T-SQL Tuesday topic asked “What code would you hate to live without?” Turns out you like using script and code to automate boring, repetitive, and error-prone tasks.

Thank you to everyone who participated; I was nervous that July holidays and summer vacations would stunt turnout, however we wound… Read more

4 comments, 2,319 reads

Posted in Bert Wagner on 17 July 2018

Building Dynamic Table-Driven Queries

This post is a response to this month’s T-SQL Tuesday #104 prompt by me! T-SQL Tuesday is a way for SQL Server bloggers to share ideas about different database and professional topics every month.

This month’s topic is asking what code would you hate to live without?


When given… Read more

1 comments, 2,672 reads

Posted in Bert Wagner on 10 July 2018

Code You Would Hate To Live Without (T-SQL Tuesday #104 Invitation)

The recent news about Microsoft acquiring GitHub has me thinking about how amazing it is for us to be part of today’s online code community.

Before modern online programming communities, finding good code samples or sharing your own code was challenging.  Forums and email lists (if searchable) were good, but… Read more

42 comments, 145 reads

Posted in Bert Wagner on 3 July 2018

Filtering Tables, Procedures, And Other Objects In SSMS

While the text of this post contains good information on SSMS object filters, I highly recommend watching this week’s video on YouTube – I stretched my creativity with filming this week while I was on vacation.

This week I’m sharing a trick I learned at Jess Pomfret‘s Ohio North… Read more

5 comments, 1,926 reads

Posted in Bert Wagner on 26 June 2018

Join Elimination: When SQL Server Removes Unnecessary Tables

In this post and video at SQLPerformance.com, I discuss what join elimination is and how it works in SQL Server.  Join elimination is one of the many techniques that the SQL Server query optimizer uses to create efficient query plans. Specifically, join elimination occurs when SQL Server can establish… Read more

0 comments, 394 reads

Posted in Bert Wagner on 19 June 2018

Prioritizing Index Performance Pains – What I Learned From Brent Ozar’s Master Index Tuning Class

I love continuing my education in SQL Server.  Recently I was fortunate enough to take Brent Ozar’s 3-day live online Master Index Tuning training class.

Since I had never taken an online class before, I thought it’d be fun to write a mini-review of what I thought about the… Read more

0 comments, 2,305 reads

Posted in Bert Wagner on 12 June 2018

4 Ways To Define Lookup Values In A Query

Watch this week’s episode on YouTube.

Occasionally you may need to create a lookup table of values for a single query.  Building a permanent table of these values is a good option if you need to reuse the values frequently, but for one-off, ad-hoc queries you may want to… Read more

6 comments, 3,265 reads

Posted in Bert Wagner on 5 June 2018

What Does The GO Command Do?

Watch this week’s episode on YouTube.

When I started working with T-SQL, I thought the GO command was optional, kind of like semicolons.  It appeared in plenty of SSMS generated scripts, but it seemed like I never had to add it to any queries of my own:

SELECT…

Read more

4 comments, 3,133 reads

Posted in Bert Wagner on 29 May 2018

Converting JSON to SQL Server CREATE TABLE Statements

Watch this week’s episode on YouTube.

Tedious, repetitive tasks are the bane of any lazy programmer.  I know, because I am one.

One such repetitive task that I find comparable to counting grains of rice is building database layouts from JSON data sources.

While some online services exist that will… Read more

0 comments, 2,759 reads

Posted in Bert Wagner on 22 May 2018

Why Is My VARCHAR(MAX) Variable Getting Truncated?

Watch this week’s episode on YouTube.

Sometimes SQL Server doesn’t do what you tell it to do.

Normally that’s ok – SQL is a declarative language after all, so we’re supposed to tell it what we want it to do, not how we want it done.

And while that’s… Read more

0 comments, 371 reads

Posted in Bert Wagner on 15 May 2018

Contributing to Community

This post is a response to this month’s T-SQL Tuesday #102 prompt by Riley Major. T-SQL Tuesday is a way for SQL Server users to share ideas about different database and professional topics every month.

The prompt I’ve chosen to write about this month is how and why I… Read more

0 comments, 542 reads

Posted in Bert Wagner on 8 May 2018

Is It Possible To Conditionally Index JSON Data?

Check out this week’s episode on YouTube.

Recently I received a great question from an attendee to one of my sessions on JSON (what’s up Nam!):

At first glance it sounds like a filtered index question, and ultimately it is, but because of some of the intricacies involved in… Read more

0 comments, 1,756 reads

Posted in Bert Wagner on 1 May 2018

The Forgotten Fourth SQL Server Recovery Model

SQL Server recovery models define when database transactions are written to the transaction log.   Understanding these models is critical for backup and recovery purposes as well as for how their behaviors impact the performance of queries.

Today we’ll examine the differences between SQL Server’s three official recovery models as well… Read more

1 comments, 2,798 reads

Posted in Bert Wagner on 24 April 2018

In-Memory OLTP: A Case Study

Watch this week’s episode on YouTube.

When In-Memory OLTP was first released in SQL Server 2014, I was excited to start using it.  All I could think was “my queries are going to run so FAST!

Well, I never got around to implementing In-Memory OLTP.  Besides having an… Read more

1 comments, 2,407 reads

Posted in Bert Wagner on 17 April 2018

3 Essential Tools For The SQL Server Developer

This post is a response to this month’s T-SQL Tuesday #101 prompt by Jens Vestergaard. T-SQL Tuesday is a way for SQL Server bloggers to share ideas about different database and professional topics every month.

This month’s topic is about what essential SQL Server related tools you use on… Read more

1 comments, 290 reads

Posted in Bert Wagner on 10 April 2018

Power Query vs DAX: In The Power BI Kitchen with Eugene Meidinger

Watch this week’s episode on YouTube.

In this week’s video with Power BI expert Eugene Meidinger, we’re in the kitchen learning about Power BI.

Power BI has two languages available for working with data: Power Query and DAX.

Power Query is most useful cleaning and preparing your data… Read more

1 comments, 1,866 reads

Posted in Bert Wagner on 3 April 2018

Older posts