SQL Server – "Denali" – PERCENT_RANK() Analytic Function
PERCENT_RANK() returns the position of a row within the result set. In contrast to RANK() function, PERCENT_RANK() ranks rows between...
2011-08-19
1,064 reads
PERCENT_RANK() returns the position of a row within the result set. In contrast to RANK() function, PERCENT_RANK() ranks rows between...
2011-08-19
1,064 reads
AdvertisementsSQL Server 2008 latest cumulative updates 9 build 10.50.1804 available now. You may download and test itCumulative Update 9 for...
2011-08-19
1,029 reads
Source tables change over time. A data mart or data warehouse that is based on those tables needs to reflect these...
2011-08-19
4,961 reads
Some time ago, I wrote an introductory post about bitwise operations in SQL Server. I had fully intended on writing a follow-up to that. Alas the opportunity has passed...
2011-08-19
28 reads
Some time ago, I wrote an introductory post about bitwise operations in SQL Server. I had fully intended on writing...
2011-08-19
1,603 reads
As I mentioned in the introductory post, I’m summarizing posts from previous years in the the past week. Some posts...
2011-08-19
757 reads
Assuming the database was detached successfully , this t-sql code will attach a mdf file without a log file . It will also...
2011-08-19
1,336 reads
Microsoft has released Cumulative Update 9 for SQL Server 2008 R2 RTM, which is Build 10.50.1804.0. I count 26 fixes...
2011-08-19
2,110 reads
Today Jonathan presented on Replication and Paul about Database Snapshots, and his
baby called "CHECKDB" – he has been married with CHECKDB...
2011-08-19
933 reads
CUME_DIST() calculates relative position of a value relative to a group of values. The value returned by CUME_DIST() is > 0...
2011-08-18
681 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