2011-06-13 (first published: 2008-04-19)
5,865 reads
2011-06-13 (first published: 2008-04-19)
5,865 reads
A stored procedure for restoring a database up to the latest log backup from a file folder. Compatible with the backups made by standard SQL maintenance plan.
2011-06-10 (first published: 2011-05-27)
1,593 reads
When creating a backup that will be restored to a development database, you may need to mask PII information. This script will help you with that.
2011-06-09 (first published: 2011-05-25)
1,474 reads
Easily remove duplicate records without temp tables by using a CTE.
2011-06-07 (first published: 2008-03-19)
6,950 reads
2011-06-03 (first published: 2008-08-18)
1,112 reads
2011-06-02 (first published: 2008-04-24)
9,308 reads
2011-06-01 (first published: 2007-09-02)
10,495 reads
2011-05-30 (first published: 2011-05-23)
2,434 reads
Script generator to restore to a new DB. Designed on Ola Hallengren's backup solution.
2011-05-27 (first published: 2011-05-20)
971 reads
This procedure works like the sp_spaceused procedure but this one shows statistics for all tables in the selected database or for all databases (excluding tempdb and model).
2011-05-25 (first published: 2008-03-05)
10,204 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