All About Tech

Victory goes to the player who makes the next-to-last mistake

Week 1 — Foundations

/* 2. Detect changed rows – compare all non‑key columns */ ;WITH ChangedRows AS ( SELECT src.CustomerID FROM #Stg_Customer src INNER JOIN dbo.DimCustomer tgt ON src.CustomerID = tgt.CustomerID AND tgt.IsCurrent = 1 WHERE ISNULL(src.FirstName,'') <> ISNULL(tgt.FirstName,'') OR ISNULL(src.LastName,'') <> ISNULL(tgt.LastName,'') OR ISNULL(src.Email,'') <> ISNULL(tgt.Email,'') OR ISNULL(src.Phone,'') <> ISNULL(tgt.Phone,'') OR ISNULL(src.Address,'') <> ISNULL(tgt.Address,'') OR ISNULL(src.City,'') <> ISNULL(tgt.City,'') OR ISNULL(src.State,'') <> ISNULL(tgt.State,'') OR ISNULL(src.ZipCode,'') <> ISNULL(tgt.ZipCode,'') OR ISNULL(src.BirthDate,'1900-01-01') <> ISNULL(tgt.BirthDate,'1900-01-01') ) -- 2a. Close the old version UPDATE tgt SET EndDate = GETDATE(), IsCurrent = 0 FROM dbo.DimCustomer tgt JOIN ChangedRows cr ON tgt.CustomerID = cr.CustomerID WHERE tgt.IsCurrent = 1;

Several licensed Japanese adult streaming services now offer English subtitles on select titles:

The boat had a capacity to carry only two people at a time. However, Chris noticed that it was sturdy enough to carry their luggage as well.