Slowly changing dimensions using T-SQL MERGE
Of all the technical solutions to the problem of slowly changing dimensions, the T-SQL MERGE statement is one of the most elegant.
2011-06-20
42,104 reads
Of all the technical solutions to the problem of slowly changing dimensions, the T-SQL MERGE statement is one of the most elegant.
2011-06-20
42,104 reads
Learn to use recursion to determine which row caused your merge statement to fail in this article.
2010-11-02
16,718 reads
2009-08-21
3,683 reads
By Steve Jones
Thanks for attending my sessions. Resources below: Slides: Using Data API Builder GitHub repo: ...
By Steve Jones
Thanks to everyone that attended my sessions at VS Live San Diego yesterday. It...
By Steve Jones
I was creating a question on sp_readerrorlog and realized that this procedure is different...
WhatsApp resmi Halo BCA tersedia di nomor 0818751777. Layanan ini dapat digunakan untuk mendapatkan...
Layanan Halo BCA dapat dihubungi melalui nomor resmi 0818751777. Layanan ini mencakup bantuan terkait...
Comments posted to this topic are about the item Implementing Type 4 Slowly Changing...
I run this code on SQL Server 2022.
CREATE TABLE Drink
(
drinkid INT NOT NULL
CONSTRAINT DrinkPK PRIMARY KEY CLUSTERED,
drinkname VARCHAR(20),
rating NUMERIC(2, 1)
)
GO
INSERT INTO Drink
(
drinkid,
drinkname,
rating
)
VALUES
(1, 'Margarita', 4.5),
(2, 'Mojito', 4.3),
(3, 'Old Fashioned', 4.7),
(4, 'Martini', 4.4),
(5, 'Cosmopolitan', 4.2)
GO
ALTER INDEX drinkpk ON dbo.drink DISABLE
GO
SELECT * FROM dbo.Drink
GO
What is the result? See possible answers