Breaking Down DENSE_RANK(): A Step-by-Step Guide for SQL Enthusiasts
Learn how it works and how to use the DENSE_RANK() function in your code.
2024-04-12
3,461 reads
Learn how it works and how to use the DENSE_RANK() function in your code.
2024-04-12
3,461 reads
Unlock the power of SQL's NTILE function with our latest deep-dive article. Learn to segment your data effectively into quantiles for more nuanced analysis, discover common pitfalls and their solutions, and optimize your queries for peak performance.
2024-02-03 (first published: 2024-01-03)
4,801 reads
Dive deep into the powerful SQL window functions, LAG() and LEAD(). Explore their intricacies, discover real-world examples, and avoid common pitfalls.
2023-12-11
8,174 reads
Welcome to the fascinating world of SQL window functions! Today, we'll explore in detail: RANK() and DENSE_RANK().
2023-11-20 (first published: 2023-11-15)
12,091 reads
By Brian Kelley
For those testing SQL Server 2025 before it officially releases, Microsoft has made the...
If there’s one thing I’ve learned in consulting, it’s that SQL Server, and other...
By Chris Yates
Embracing the New Paradigm Fabric real-time data signals a fundamental shift in how organizations...
Comments posted to this topic are about the item Detecting Multiple Changes
Comments posted to this topic are about the item Ghostworkers
We have a few stored procs where we need to a dos command "net...
I want to write a trigger to detect changes to columns in SQL Server 2022. I have this table:
CREATE TABLE CustomerLarge (CustomerID INT NOT NULL IDENTITY(1, 1) CONSTRAINT CustomerLargePK PRIMARY KEY CLUSTERED , CustomerName VARCHAR(20) , CustomerContactFirstName VARCHAR(40) , CustomerContactLastName VARCHAR(40) , Address VARCHAR(20) , Address2 VARCHAR(20) , City VARCHAR(20) , CountryCode CHAR(3) , Postal VARCHAR(20) , creditlimit INT , discount NUMERIC(4, 2) , lastorderdate DATETIME , lastorderamount NUMERIC(10, 2) , lastordercontact VARCHAR(20) , created DATETIME , modified DATETIME , modifiedby VARCHAR(20) , statusid INT , active BIT , customersize INT , primarysalesid INT); GOI want to determine if both the CustomerContactFirstName and CustomerContactLastName fields are changed, but no others. What is the mask I need to use with COLUMNS_UPDATED()? See possible answers