Rebuild index selectively
Rebuild index is expensive most time. So you don't rebuild all index blindly.
2015-11-04 (first published: 2015-10-05)
1,860 reads
Rebuild index is expensive most time. So you don't rebuild all index blindly.
2015-11-04 (first published: 2015-10-05)
1,860 reads
The script uses dynamic SQL twice
first to get the detail about the database structure and create ddl out of it
second to execute each DDL created
2015-11-03 (first published: 2015-10-07)
996 reads
How to Paginate a query result set to keep from pulling the whole result set to the client side
2015-11-02 (first published: 2014-05-05)
3,733 reads
A set of queries which attempt to gather as much security-related information on a single database as possible.
2015-10-30 (first published: 2013-10-24)
5,754 reads
Provide list of Stored Procedures that have been changed in past 7 days.
2015-10-29 (first published: 2013-04-11)
3,606 reads
2015-10-27 (first published: 2014-07-08)
4,424 reads
2015-10-23 (first published: 2014-05-13)
3,754 reads
Calculating working hours can be painful due to all the variances that they imply. This function will calculate working hours between 2 dates which might include time. There's an option to use a holidays table that will vary in each environment.
2015-10-22 (first published: 2014-05-22)
3,761 reads
2015-10-21 (first published: 2013-12-26)
4,075 reads
Often when tracking down problems, you need to know if anything has changed recently, this script will tell you...
2015-10-20 (first published: 2013-05-30)
3,957 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