The SQL NULLIF function
NULLIF is a SQL function that is used to compare two columns. Use NULLIF to compare two columns and return NULL if they are equal to each ot
2022-01-17
54 reads
NULLIF is a SQL function that is used to compare two columns. Use NULLIF to compare two columns and return NULL if they are equal to each ot
2022-01-17
54 reads
This topic describes how to change the availability mode of an availability replica in an Always On availability group in SQL Server by usin
2022-01-17
60 reads
When you are experiencing SQL Server Error Msg 3231, Level 16, State 1 while backing up SQL Database, it is important to troubleshoot the er
2022-01-17
500 reads
This blog troubleshoots SQL Server Error Msg 3132, Level 16, State 1 while backing up SQL Database.
2022-01-17
52 reads
I was doing a little work with CosmosDB recently, and there were a few things that surprised me about the platform. I’m also not 100% sure I completely understand...
2022-01-28 (first published: 2022-01-17)
253 reads
I started to add a daily coping tip to the SQLServerCentral newsletter and to the Community Circle, which is helping me deal with the issues in the world. I’m...
2022-01-17
31 reads
Checkpoints are essential in SQL Server to help with the durability and reliability of data persisted in the database. When done right, you barely even notice them and performance...
2022-02-02 (first published: 2022-01-14)
587 reads
I set goals at the beginning of last year, and I’m doing the something similar this year. Last year I didn’t do well in my goals. I definitely had...
2022-01-14
28 reads
One of my previous blogs looked at using the free resources that Microsoft provides to link to an Azure Data Explorer Cluster and start using Kusto Query Language. In...
2022-01-14
33 reads
I started to add a daily coping tip to the SQLServerCentral newsletter and to the Community Circle, which is helping me deal with the issues in the world. I’m...
2022-01-14
20 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