SQL Clone
SQLServerCentral is supported by Redgate
Log in  ::  Register  ::  Not logged in

Archives: December 2009

Age calculation with SQL Server

There seem to be many different methods being suggested to calculate an age in SQLServer.  Some are quite complex but most are simply wrong.  This is by far the simplest and accurate method that I know.


Declare @Date1 datetime
@Date2 datetime

@Date1 = '15Feb1971'
Select @Date2 =…

Read more

0 comments, 1,097 reads

Posted in Dave Ballantynes blog on 8 December 2009

Phil Factor Speed Phreak SQL Challenge Number 3

The latest Phil Factor challenge is now active here . The prize has now been increased to $100...(read more)

Read more

0 comments, 394 reads

Posted in Dave Ballantynes blog on 4 December 2009