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.

Blog Post

Multiple Identity Inserts

Watch this week's video on YouTube
This week I want to share something that surprised me about using SQL Server's SET IDENTITY_INSERT statement.
I started with two tables with identity columns...

2019-06-25

4 reads

Blog Post

Multiple Identity Inserts

Watch this week's video on YouTube
This week I want to share something that surprised me about using SQL Server's SET IDENTITY_INSERT statement.
I started with two tables with identity columns...

2019-06-25

3 reads

Blog Post

Joker's Wild

This past weekend I had a blast presenting Joker's Wild with Erin Stellato (blog|twitter), Andy Mallon (blog|twitter), and Drew Furgiuele (blog|twitter).

Watch this week's video on YouTube
Table of contents:

What is...

2019-06-11

1 reads

Blog Post

Joker's Wild

This past weekend I had a blast presenting Joker's Wild with Erin Stellato (blog|twitter), Andy Mallon (blog|twitter), and Drew Furgiuele (blog|twitter).

Watch this week's video on YouTube
Table of contents:

What is...

2019-06-11

Blog Post

CHOOSE() in SQL Server

Watch this week’s episode on YouTube. While I know I don’t utilize most of the features available in SQL Server, I like to think I’m at least aware that those features...

2019-06-04

298 reads

Blog Post

CHOOSE() in SQL Server

Watch this week's video on YouTube
While I know I don't utilize most of the features available in SQL Server, I like to think I'm at least aware that those features exist.
This...

2019-06-04

1 reads

Blog Post

CHOOSE() in SQL Server

Watch this week's video on YouTube
While I know I don't utilize most of the features available in SQL Server, I like to think I'm at least aware that those features exist.
This...

2019-06-04

3 reads

Blogs

Simple Talks Episode 9–Data masking and subsetting

By

The episode on data masking and subetting is out. You can see it here:...

T-SQL Tuesday #180: Avoid Perfect for Good Enough

By

I'm listening to Effortless by Greg McKeon (link to author's page) through Audible.com. He...

Book Review – Humanizing Data Strategy by Tiankai Feng

By

This book was making its rounds on social media, and the concept seems interesting...

Read the latest Blogs

Forums

Does SSRS Report with Stored Procedure execute SQL string?

By danyeungw

I declare @Where based on the input parameter in the stored procedure. Set @SQL...

SQL Server Constrained Delegation

By cw255

Hi, hoping someone can help. We're in the process of migrating to a new...

Get Sum and Last month sum

By GrassHopper

I want to get the sum and I want to get the sum of...

Visit the forum

Question of the Day

Comparing Images

I am building an ETL process between these tables in SQL Server 2022 set to 160 compatibility level:

CREATE TABLE Image_Staging
( imageid     INT NOT NULL CONSTRAINT Image_StagingPK PRIMARY KEY
, imagestatus TINYINT
, imagebinary IMAGE);
GO

CREATE TABLE Images
( imageid       INT NOT NULL CONSTRAINT ImagesPK PRIMARY KEY
, imagestatus   TINYINT
, imagemodified DATETIME
, imagebinary   IMAGE);
GO
I want to run this query to check if the images already loaded exist. This will help me decide if I need to insert or update an image. What happens with this query?
SELECT i.imageid
FROM
  dbo.Image_Staging AS ist
  INNER JOIN dbo.Images AS i
    ON ist.imagebinary = i.imagebinary;

See possible answers