Professional Association of SQL Server (PASS)
I recently discovered the Professional Association of SQL Server (PASS) virtual chapters. For those of you who struggle to make...
2010-01-31
2,032 reads
I recently discovered the Professional Association of SQL Server (PASS) virtual chapters. For those of you who struggle to make...
2010-01-31
2,032 reads
1. What are the Sql Joins?Sql Joins are the way to get data from many tables based on some logical...
2010-01-31
1,948 reads
I saw a blog post from my friend Paul Randal recently in which he recounted the books he’d read in...
2010-01-31
1,768 reads
1. What is the difference between the Union and Union All?
1) Union is used to select distinct data from the...
2010-01-31
2,005 reads
1. What is the Normalization?Normalization:-Normalization can be defined as the process of organization the data to reduce the redundant table...
2010-01-31
2,185 reads
Group By:- Group By clauses is used to groups rows based on the distinct values of the specified columns.
The syntax...
2010-01-31
2,566 reads
Both Having Clause and Where clause is used to filter the data coming from the Select statement, but still there...
2010-01-31
11,970 reads
Sometimes duplicate values in tables can create a major problem when we do not make a primary key or a...
2010-01-31
4,054 reads
Views:- View can be described as virtual table which derived its data from one or more than one table columns.It...
2010-01-31
1,730 reads
Introduction
Ever need a programmatic way to figure out if a SQL Agent job is running? I did. After spending a...
2010-01-31
2,567 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