Using SELECT INTO with UNION Statements
On occassion, I need to take a number of different result sets and combine them into a single output, which I then want to store in a temporary table....
2016-03-11
12 reads
On occassion, I need to take a number of different result sets and combine them into a single output, which I then want to store in a temporary table....
2016-03-11
12 reads
On occassion, I need to take a number of different result sets and combine them into a single output, which...
2016-03-11
442 reads
Another post for me that is simple and hopefully serves as an example for people trying to get blogging as...
2016-03-11
691 reads
I recently worked on an engagement where the requirement was to process excel spreadsheets sent to a group mailbox hosted...
2016-03-11
348 reads
I recently worked on an engagement where the requirement was to process excel spreadsheets sent to a group mailbox hosted...
2016-03-11
5,131 reads
How many of you are known as the “Grumpy DBA” or have a bad reputation with users because you are...
2016-03-11
278 reads
By now, all you folks who logged on to watch the ultimate Microsoft Data Driven event, streamed live from New...
2016-03-11
1,281 reads
I recently came across the following error message when I tried to look at the batches in the Integration Management...
2016-03-11
825 reads
It’s Monday time for this week’s weekly blog and twitter round-up for last week. If you haven’t already, follow me...
2016-03-11
470 reads
I’ve seen tables that are referenced by many other tables in MSSQL databases and that number was usually being around...
2016-03-10
125 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