T-SQL query to copy data from one database to another database
T-SQL query to copy the rows of all the tables from one database to another database only if they have rows in Source DB and exact same Schema in...
2019-10-30
6 reads
T-SQL query to copy the rows of all the tables from one database to another database only if they have rows in Source DB and exact same Schema in...
2019-10-30
6 reads
T-SQL query to copy the rows of all the tables from one database to another database only if they have rows in Source DB and exact same Schema in...
2019-10-30
8 reads
T-SQL query to return the latest available database backup chain (Full, Differential and Log) of individual databases along with their backup size and compressed size.
2019-10-30
2 reads
T-SQL query to return the latest available database backup chain (Full, Differential and Log) of individual databases along with their backup size and compressed size.
2019-10-30
1 reads
T-SQL script to purge all the tables including foreign key references. The script has been made smart enough to use TRUNCATE wherever there is no foreign key reference and...
2019-10-30
2 reads
T-SQL script to purge all the tables including foreign key references. The script has been made smart enough to use TRUNCATE wherever there is no foreign key reference and...
2019-10-30
1 reads
PASS Summit 2019 starts up next Monday with pre-conference sessions. I’ve got my schedule all set, and I’m going to be busy: I’m speaking in two full-day pre-conference sessions,...
2019-10-30
3 reads
It’s been more than a year and a half since Robert Davis passed away. I wrote a bit about Robert’s passing last April. I haven’t written about him since,...
2019-10-25
1 reads
It’s just ten days until PASS Summit 2019 begins in Seattle. The schedule is up and there are loads of good sessions. Here’s what I’m putting on my calendar...
2019-10-24
2 reads
I am living the dream, y’all: yesterday I was finishing up my workday and needed to record a video, but realized that our puppy had spent enough time in...
2019-10-17
2 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