SQL 2012 Release Candidate 0

Just installed SQL 2012 RC0 specifically to check out the new stuff in Power View, have a look at http://blogs.msdn.com/b/robertbruckner/archive/2011/11/17/what-s-new-in-power-view.aspx to see all cool new features, however there are few things that I would have loved to have seen included.

– Support for Hierarchies

– Cards or Tile region slicers, the addition of grid filters is cool, but if you are filtering cards within a region that contains a grid with related measures it does not get filtered.

– Font control within grids and cards

– Image size control

– Dimension attribute aliasing

– The abilty to publish documents that cannot be edited.

 

SQL – Converting an integer to datetime

Sometimes in life you come across integers that represent a datetime value and you want to convert it to make it more appealing . Here is a handy little helper that will convert integers represented as ‘YYYYMMDDHHMM’, ie 200805051010;

 select CAST(STUFF(STUFF(STUFF(STUFF(CAST(200805051010 as varchar(20) ), 5, 0, ‘-‘), 8, 0, ‘-‘),11,0,’ ‘), 14, 0, ‘:’) as datetime)
as dt.

(You could also use the convert function if you wanted a different date format, I know I could have cast the int to a varchar(8) and gotten a valid date without all the stuffing, but I needed to keep the time part of the datetime)

As with just about everything that I do, I am sure there is a much better more efficient way to do it that involves less typing, but it works and that is my ultimate goal