String Character Count
A while ago I once attended an interview where I was asked to write a short script that counts each letter of a given string.
2013-04-25 (first published: 2013-04-12)
1,669 reads
A while ago I once attended an interview where I was asked to write a short script that counts each letter of a given string.
2013-04-25 (first published: 2013-04-12)
1,669 reads
This script will search the entire server and give the name and schema of the database where the table exists.
2012-06-25 (first published: 2012-06-09)
1,457 reads
This script uses a cursor to loop through all tables and get the count and table sizes using sp_spaceused. It is much faster and efficient than use 'SELECT COUNT(*) FROM TABLE_NAME'.
2012-06-22 (first published: 2012-06-09)
1,968 reads
The code below uses a CASE STATEMENT to group sales data based on date,week,month and quarter. It should be executed in AdventureWorks 2005 or 2008.
2012-05-30 (first published: 2012-05-10)
2,027 reads
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...
By Steve Jones
One of the things that I’ve been asked in every operations situation is what...
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