Improving Performance for Some LIKE “%string%” Searches (SQL Spackle)
If you've ever wondered if you can do better than an INDEX SCAN when you do a LIKE "%string%" search, read on...
2024-10-22 (first published: 2014-04-07)
45,885 reads
If you've ever wondered if you can do better than an INDEX SCAN when you do a LIKE "%string%" search, read on...
2024-10-22 (first published: 2014-04-07)
45,885 reads
Triggers in T-SQL have many uses. There are right and wrong ways to write triggers. To learn the difference, read on...
2024-10-22 (first published: 2015-03-17)
7,006 reads
Calculating elapsed time between time values can be an interesting problem that is easily solved even when data anomalies are present.
2024-09-20 (first published: 2013-09-26)
18,400 reads
Normalizing or UNPIVOTing data may be improved by using this lesser known approach in SQL Server 2008 or later.
2024-07-26 (first published: 2012-08-02)
43,455 reads
The SQL MERGE statement offers convenience, safety and elegance, but how does it perform compared to other methods?
2017-02-03 (first published: 2013-10-28)
156,673 reads
Learn how to develop and test a template for logging and error handling in a multi-step SQL stored procedure
2015-09-18 (first published: 2014-01-20)
36,296 reads
Recently while working with a table where there were two columns, one a DATE datatype and a second TIME datatype,...
2015-09-08 (first published: 2015-08-28)
78,264 reads
What exactly does this mean? We’ve heard of “code patterns” in other programming languages, but what does it mean to...
2015-06-04 (first published: 2015-05-27)
9,215 reads
There is one software tool that should be in every software developer’s tool chest. That is knowledge of the platform...
2015-05-26 (first published: 2015-05-21)
7,597 reads
Today’s blog will be the second in a multi-part series on replicating Excel functions in T-SQL, continuing with Excel’s NORM.DIST...
2015-05-14
10,756 reads
By Steve Jones
The episode on data masking and subetting is out. You can see it here:...
By Brian Kelley
I'm listening to Effortless by Greg McKeon (link to author's page) through Audible.com. He...
This book was making its rounds on social media, and the concept seems interesting...
I declare @Where based on the input parameter in the stored procedure. Set @SQL...
Hi, hoping someone can help. We're in the process of migrating to a new...
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); GOI 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