Making Temporal Databases Work. Part 2: Computing Aggregates Across Temporal Versions
In this part 2 we discuss what kind of aggregates can be obtained from a temporal database and how to express these aggregations in the SQL language.
2024-08-02
In this part 2 we discuss what kind of aggregates can be obtained from a temporal database and how to express these aggregations in the SQL language.
2024-08-02
In this tip we look at how to use Common Table Expressions CTE in SQL Server including the syntax, use cases, using more than 1 CTE at the same time and recursive CTEs with a parameter.
2019-06-12
Last month I was fortunate to have my first ever article published on Simple-Talk, among the best quality website for sql server articles ever. During the process of writing...
2019-04-15
Tables that return the value of the data in the table at a particular point of time have been with us since the first relational database, but have always required special queries and constraints, and can be tricky to get right. System-versioned Temporal Tables, new in SQL Server 2016, make such tables behave like any other. How do you create one, or modify an existing table? How can you get an In-Memory Optimized OLTP table to be Temporal? Alex Grinberg shows how.
2017-05-30
3,726 reads
2016-10-31
1,158 reads
2016-10-26
1,018 reads
With the introduction of temporal table support in SQL Server 2016 Microsoft also added some additional functionality that makes it easy for you to join the current and history records of a system-versioned table. Greg Larsen shows you some of the different ways to do analysis of your system-versioned records over time.
2016-08-31
4,554 reads
In this latest T-SQL Tuesday, Rob Farley takes a look at a couple of unexpected aspects of query plans you might observe when using Temporal Tables in SQL Server 2016.
2016-08-04
3,106 reads
For this month's T-SQL Tuesday, Rob Farley takes a look at a couple of unexpected aspects of query plans you might observe when using Temporal Tables in SQL Server 2016.
2016-07-15
3,095 reads
In this article Greg Larsen explores using the temporal table feature of SQL Server 2016 to create a history table for an existing SQL Server table.
2016-06-22
3,450 reads
You can find the slides of my session on the €100 DWH in Azure...
By Steve Jones
This value is something that I still hear today: our best work is done...
By gbargsley
Have you ever received the dreaded error from SQL Server that the TempDB log...
Hi everyone I am writing an SP where there is logic inside the SP...
Comments posted to this topic are about the item Planning for tomorrow, today -...
We have a BI-application that connects to input tables on a SQL Server 2022...
I try to run this code on SQL Server 2022. All the objects exist in the database.
CREATE OR ALTER VIEW OrderShipping AS SELECT cl.CityNameID, cl.CityName, o.OrderID, o.Customer, o.OrderDate, o.CustomerID, o.cityId FROM dbo.CityList AS cl INNER JOIN dbo.[Order] AS o ON o.cityId = cl.CityNameID GO CREATE OR ALTER FUNCTION GetShipCityForOrder ( @OrderID INT ) RETURNS VARCHAR(50) WITH SCHEMABINDING AS BEGIN DECLARE @city VARCHAR(50); SELECT @city = os.CityName FROM dbo.OrderShipping AS os WHERE os.OrderID = @OrderID; RETURN @city; END; goWhat is the result? See possible answers