Function to display integer as binary string
This function converts an integer to its binary representation. e.g. 15 is converted to '00001111'
2015-04-29 (first published: 2014-02-24)
830 reads
This function converts an integer to its binary representation. e.g. 15 is converted to '00001111'
2015-04-29 (first published: 2014-02-24)
830 reads
This function counts the number of 1's in the binary representation of an integer.
2015-04-28 (first published: 2014-02-24)
994 reads
Extract default & Named Instance from @@servername.
Print all characters before and after \ to find default and named instance name.
2015-04-27 (first published: 2015-04-15)
1,169 reads
2015-04-24 (first published: 2015-04-15)
1,220 reads
Check Status of a database. It will loop through all databases and will print message if the db is present.
2015-04-21 (first published: 2015-04-10)
1,336 reads
READ Data from default Trace to know when the objects are altered. If no database name is provided, it will run through all the databases.
2015-04-17 (first published: 2015-04-08)
1,436 reads
This script helps to identify which database/log takes most of the disk space and how much is free.
2015-04-15 (first published: 2013-06-18)
3,021 reads
Sometimes running DBCC CHECKDB WITH DATA_PURITY returns thousands of affected columns. This script automates the identification of those columns.
2015-04-13 (first published: 2013-07-04)
2,452 reads
Find any code objects that interact with a given table/view, or call another given code object.
2015-04-10 (first published: 2013-07-05)
4,647 reads
A stored procedure that will parse (shred) the contents of any well-formed XML document into a SQL table.
2015-04-08 (first published: 2013-07-09)
5,245 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