• subscribe
July 27, 2011 03:00 PM

New Features in SQL Server Denali CTP 3 for Developers

Michael K. Campbell is overjoyed to see a new FORMAT() method plus a slew of other new features and functions in SQL Server Denali CTP 3
Dev Pro
InstantDoc ID #139988

CTP 3 for SQL Server Denali just barely dropped with a whole new set new features, functions, and benefits that developers are going to love. In fact, some of these new features are great enough that developers will wonder why it has taken SQL Server so long to provide them.

SQL Server Denali CTP 3: New Features and Goodies


In "SQL Server Denali for Developers" (
part 1 and part 2), I covered new features and additions to SQL Server Denali that developers will be able to leverage. However, as we draw closer to an actual release date for the next version of SQL Server, it's great to see that Microsoft is still dropping in new features and capabilities that developers will be able to take advantage of.

As such, CTP 3 adds a whole bevy of not only new features and capabilities, but better documentation and guidance about how these features and capabilities can be used. To get a feel for what's new anytime a new release of SQL Server is unleashed upon the world, I always take a peek at the "What's New?" section of SQL Server Books Online. Therefore, if you're curious about SQL Server Denali CTP 3 and haven't had time to install it yet, I'd recommend taking a look at the top-level overview of what's new— to see what's new all across the board in Denali. Likewise, if you're just interested in the Database Engine (as opposed to other services and features), there's a dedicated "What's New" section there as well—which showcases improvements and changes to availability, manageability, scalability, and security enhancements—along, of course, with new programmability enhancements.

SQL Server Finally Gets a FORMAT() Method


In regard to what is easily my favorite new addition to SQL Server in years, I was happy to see that rumors of SQL Server finally getting a
FORMAT() method were correct.

Just speaking in terms of dates and times, there have been far too many times in the past where I needed some form of custom date-time or timestamp output that required some sort of perversion resembling parsing and concatenating parts or aspects of two different CONVERT() formats.

However, with the new FORMAT() method, those days will be over (when working against Denali databases). And, rather than providing a lengthy description of how the FORMAT() method works, I'll just include a screenshot (Figure 1) that aptly showcases how a picture can be worth a thousand words:

 

139988_Fig1_Denali_FORMAT_method_0
Figure 1: Denali FORMAT method

 

 

 

And what's great about this screenshot is that while it showcases how easy it is to format dates or times for other  cultures or how easy it is to use place-holders for complete control over output formatting, it's only focused on working with dates and times—meaning that it can format more than just dates and times. (Though, truth is that if the FORMAT() only worked with dates and times, I'd still be ecstatic about it.)

Instead, though, as you can see from this screenshot (Figure 2), the FORMAT() method can handle all sorts of types of other formatting requirements:

 

139988_Fig2_FORMAT_method_various_output_types_0
Figure 2: Using the FORMAT method to format various types of output

 

 

 



ARTICLE TOOLS

Comments
    There are no comments to display. Be the first one!
You must log on before posting a comment.

Are you a new visitor? Register Here