SQL Server Advent Calendar 1 – Dates

There is no possible connection between databases and Christmas, so I simply wanted to share 24 my favourite bits and bobs that are in SQL Server 2008….

The new date data types in SQL server crack a problem I have had since I started BI as there is (nearly) always a time dimension in every data warehouse. In many retail data warehouses the grain (level of detail) was reduced by grouping all transactions in a day.  The trouble is in SQL Server 2005, you had to create a date like 25/12/2008 00:00 as per dimTime in AdventureWorks

image

Now we a date datatype which also allows ius to store just the date and has implicit conversion form datetime to rip out the time.

For more on the new date data types check books on line here.

Technorati Tags: SQL server 2008,datetime,data types