EOMONTH () Function in SQL Server Denali

by Amol 22. September 2011 09:52

SQL Server Denali introduced new function EOMONTH() to calculate End Of Month date

SELECT EOMONTH (GETDATE()) LastDayOfMonth  -- Will return last day of the month

LastDayOfMonth
-------------------------
2011-09-30 00:00:00.000

In earlier version we need to many date time function to the last day of the month.

Tags: , ,

General

CHOOSE() function in SQL Server Denali

by Amol 22. September 2011 09:30

SQL Server Denali introduces some cool function which makes programming easy. Let's take an example of new function CHOOSE() which is introduced in SQL Server Denali

CHOOSE() fuction will returns a value from a given array of values based on specified Index.

SELECT CHOOSE(MONTH(GETDATE()), 'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec')

 Above statement will return the Month Name based on Month Number. 

Tags: ,

General

AdventureWorks Sample Databases for SQL Server Denali

by Kiran 11. March 2011 08:36

AdventureWorks Sample Databases for SQL Server Denali CTP1

AdventureWorks Sample Databases for SQL Server Denali is available to download. This release uses the AdventureWorks2008R2 and AdventureWorksDW2008R2 sample databases

Click here to download

Tags: ,

General

Tag cloud