TSQL End of Current Month
Thursday, July 8th, 2010select dateadd(m, datediff(m, 0, dateadd(m, 1, getdate())), -1)
Proin accumsan urna in mi. Aenean elementum egestas tortor. Donec neque magna, auctor a, dapibus sit amet, facilisis sit amet, ligula..
select dateadd(m, datediff(m, 0, dateadd(m, 1, getdate())), -1)
Running totals are one of those things that are used a lot in reporting, and custom running totals end up being used more than not. In this post we will have a quick code to show row numbers by custom increments, so hidden rows and groups etc, will not effect this. I Modified my standard [...]
—-Last Day of Previous Month SELECT DATEADD(s,-1,DATEADD(mm, DATEDIFF(m,0,GETDATE()),0)) LastDay_PreviousMonth —-Last Day of Current Month SELECT DATEADD(s,-1,DATEADD(mm, DATEDIFF(m,0,GETDATE())+1,0)) LastDay_CurrentMonth —-Last Day of Next Month SELECT DATEADD(s,-1,DATEADD(mm, DATEDIFF(m,0,GETDATE())+2,0)) LastDay_NextMonth
dateadd(m, datediff(m, 0, dateadd(m, 2, @MyDate)), -1);
SELECT DAY(DATEADD (m, 1, DATEADD (d, 1 – DAY(GETDATE()), GETDATE())) – 1)
Microsoft has the gloves off and is ready to rumble. It proudly shows 6 compelling reasons to switch to SQL Server from Oracle on their Microsoft in Government site. http://www.microsoft.com/industry/government/products/server/sql2008.mspx#WhySwitch Has Microsoft really surpassed Oracle? Well their site claims so..: SQL Server 2008 Oracle Performance and Scalability 1 1 Business Intelligence [...]
OK, this is the best blog update tools that I’ve seen in a while. It’s simple to use, a clean interface and its free. http://windowslivewriter.spaces.live.com/default.aspx Don’t forget to check out all the plug ins too! Great Job Microsoft!! http://gallery.live.com/default.aspx?l=8
Ubuntu 9,04 is out! Install Ubuntu on a VPC 2007 : Boot up and select yoiur language, for me english, Then press the down arrow to install ubuntu and press f4 Select safe graphics mode Then press f6 This will pop up a menu press escape and yoiushoyou see the command line, Delete the Quiet [...]
It’s BI TIME! With the recent announcement of the integration of SharePoint and the Performance Point Analytics and Monitoring parts it’s time to get the ball rolling on your implementations. Microsoft has been so kind as to put up one of the top OLAP analysis tools for consumer to download and evaluate. If you have [...]
MICROSOFT BI = FREE ? What a day, Yesterday saw an interesting change in BI. One small part bad, and a HUGE part good. Microsoft has made a very aggressive move against its competition in the BI space. Everyone will put their own spin on this however from my standpoint its pretty simple math [...]