innominate227
innominate227

Reputation: 11703

Temporal extensions to SQL Server

Anyone know of any temporal (http://en.wikipedia.org/wiki/Temporal_database) extensions to SQL Server?

Upvotes: 7

Views: 555

Answers (2)

Matt Johnson-Pint
Matt Johnson-Pint

Reputation: 241420

SQL Server 2016 introduced Temporal Database capabilities.

See:

Upvotes: 1

Russell Fox
Russell Fox

Reputation: 5427

I know this is an old question, but the usual solution in SQL Server is to create a "Date Dimension" database that you can join in your query. A DateDim is basically just a list of dates, but it includes columns like fiscal quarter and calendar quarter number, first/last day of that month, etc.: stuff that's difficult or time consuming to calculate on the fly but is easy to pull from a joined table.

If you search "sql date dimension" you'll find some code that will generate the table for you, though you'll need to tweak it to fit your needs. They tend to run day-by-day, but if you need hourly tracking you'll need to alter the code accordingly, for example.

Upvotes: 1

Related Questions