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
29 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
29 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
27 reads
Another post for me that is simple and hopefully serves as an example for people trying to get blogging as #SQLNewBloggers. If you’ve upgraded your SSMS lately, you might...
2019-11-07 (first published: 2019-10-30)
797 reads
Sometimes you just want to get a quick row count for a specific table – other times you may want to see a list of tables order by size...
2019-11-06 (first published: 2019-10-30)
1,084 reads
This post is a part of the series about SSDT and database project leveraging Visual Studio. We already know that SSDT can cover all objects but only on a...
2019-10-30
43 reads
This is very important error whenever you see this error it is clear that your database has “TLOG FILE FULL” and this could result into maintenance job failed or...
2019-10-30
39 reads
In checklist form! Absolute I-probably-won’t-survive-without-this ESSENTIALS Wallet Prescriptions Glasses/contacts Phone and cord Laptop and cord (okay, maybe this is just me) A jacket (after all, Seattle) Generally A GOOD IDEA...
2019-10-29
12 reads
In checklist form! Absolute I-probably-won’t-survive-without-this ESSENTIALS Wallet Prescriptions Glasses/contacts Phone and cord Laptop and cord (okay, maybe this is just me) A jacket (after all, Seattle) Generally A GOOD IDEA...
2019-10-29
28 reads
I am honored to have been selected to speak at SQL Saturday Oregon this year. They always have so many sessions submitted with only 40 slots available. I was...
2019-10-29
17 reads
Watch me comment on all of the features in this week’s video. With the release of SQL Server 2019 imminent, I thought it’d be fun to rank which features...
2019-10-29
555 reads
By Steve Jones
I caught this interesting item over on Pinal Dave’s blog: Eleven Interview Questions that...
By Hemantgiri
I use color-coded connections in SSMS to distinguish Production, Pre-Production, UAT, and Development. But...
Comments posted to this topic are about the item Split Large Queries in Athena...
Comments posted to this topic are about the item Finding Trailing Spaces
I have some data in a SQL Server 2025 database. It looks like this for the dbo.Customer table:
CustomerID CustomerName PreferredName 1 Steve Steve 2 Andy Andy 3 Brian Brian 4 Allan Allan 5 Devin Devin 6 Steve Steve 7 Sally SallyI want to detect which names have a single trailing space. The CustomerName is a varchar() and the PreferredName is a CHAR(). Does this query detect the problem rows?
SELECT
CustomerID,
CustomerName,
PreferredName
FROM Customer
WHERE CustomerName <> RTRIM(CustomerName)
OR PreferredName <> RTRIM(PreferredName); See possible answers