• Interests: Those that are of like precious faith, SQL Server

Technical Article

Blog: Disabling Log Shipping When the Secondary Server Doesn't Exist

Had a bit of an oddity show up during some testing today when trying to disable log shipping on the primary server using SSMS. My test scenario was such that our secondary server was not available any longer (had been renamed) and when I tried to disable the log shipping...

You rated this post out of 5. Change rating

2009-01-22

1,294 reads

Technical Article

Monitor Object Changes

Based on post http://www.sqlservercentral.com/forum/link.asp?TOPIC_ID=4349 I decided to write this script which will check for object changes in all databases and send an email listing the objects changed to the Operator associated with the job. This by no means offsets the need to restrict change access to objects in production, but in those cases when you […]

You rated this post out of 5. Change rating

2002-05-23

1,538 reads

Technical Article

Monitor File Growth - Set Based sp_MSforeachdb

This is a script, similar to some you have seen in the past, that will monitor file growth on all databases for the given server. This script is not a fancy solution that has a tons of bells and whistles but, it is efficient. The script is a concantanation of the create table / populate […]

4.5 (2)

You rated this post out of 5. Change rating

2001-12-21

3,368 reads

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