Merge statement- A simple way for DML TIP#105
When, I first saw this statement a Hindi proverb come to my mind which is “1 teer 2 nishane” . The...
2015-07-18
963 reads
When, I first saw this statement a Hindi proverb come to my mind which is “1 teer 2 nishane” . The...
2015-07-18
963 reads
We always take NULL very lightly. Like if we are designing database then whether it is necessary or not we...
2015-07-15 (first published: 2015-07-06)
2,728 reads
Recently, When we were delivering session on “SQL SERVER” one of the persons asked why we require Aliasing so I...
2015-07-09
468 reads
Dear All,
“Microsoft Most Valuable Professional “ – MVP is one of the prestigious tag. It is one of the dreams which came...
2015-07-02
488 reads
It’s almost one month that I didn’t write anything on the blog due to some personal reason. I am really...
2015-06-22 (first published: 2015-06-12)
2,444 reads
I don’t know why every interviewer’s favorite question “Can we insert record using View ?” If you say Yes/No the interviewer...
2015-06-20
539 reads
Let’s consider a scenario where the end user require a CSV file of all the records in a table then...
2015-06-18
1,310 reads
On last Friday , one of my colleagues had some issue related to accessing of SQL Server instance of database server...
2015-05-11 (first published: 2015-05-04)
5,934 reads
In TIP #70 we saw how to find all the running SQL SERVER instance in a network or a machine....
2015-05-04
690 reads
In last post, TIP#96 We have configured Database E-mail. Now in this post we will see how to send mail...
2015-04-26
8,618 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...
WhatsApp CS 628218520154 Jl. Suryopranoto No.40, RT.12/RW.7, Petojo Utara, Kecamatan Gambir, Kota Jakarta Pusat,...
WhatsApp CS 628218520154 Jl. Pegangsaan Timur No.1, Cikini, Kec. Menteng, Kota Jakarta Pusat, Daerah...
WhatsApp CS 628218520154 Jl. Pintu Air Raya No.36 Q, RT.6/RW.1, Ps. Baru, Kecamatan Sawah...
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