HuggyBear

Born and raised in Vancouver, Canada, with a brief excursion to study in Brussels, Melbourne & Washington D.C., Hugo has been working with SQL Server since 1998. He’s busied himself as a DBA since 1999 (with mcdba & mcitp certifications in ‘01 & ‘08 respectively), as independent consultant with his own company, Intellabase Solutions, since 2002 (now part time), and has held various permanent position with Transcontinental, Sun Life Canada, and now Alithya as a consultant. He enjoys writing documentation for quick, safe infrastructure rebuilds and expansions, and most challengingly, propositions to Executives Management on how to improve enterprise Security. He has spoken at SQLteach/DevTeach, Montreal Dot Net User Group, SQLGulf, Vermont User Groups over 5 times, has a blog on SQLServerCentral, and has been recognised as a SQL Server MVP in 2010.
  • Interests: Lately (2019): windfoiling or windsurfing with a Skroka foil....amongst many other supposedly 'extreme' sports, but which are really just the norm for people raised in Lotusland aka Vancouver, BC, lower-mainland region, Sea-to-Sky country as we know it.
  • Blog: http://dbhive.blogspot.com/
  • Jobs: SQL DBA, Data Engineer, Migrator, Clusterer, Security Implementor

Blogs

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

Monday Monitor Tips: Tracking The Cost of Instances

By

One of the things that I’ve been asked in every operations situation is what...

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