January 20, 2013 at 5:48 am
Comments posted to this topic are about the item EOMONTH - 1
January 20, 2013 at 12:55 pm
Thanks Ron
Jason...AKA CirqueDeSQLeil
_______________________________________________
I have given a name to my pain...MCM SQL Server, MVP
SQL RNNR
Posting Performance Based Questions - Gail Shaw[/url]
Learn Extended Events
January 20, 2013 at 9:15 pm
Thanks Ron for another one on SS 2012!
~ Lokesh Vij
Link to my Blog Post --> www.SQLPathy.com[/url]
Follow me @Twitter
January 20, 2013 at 10:03 pm
Thanks Ron .
~ demonfox
___________________________________________________________________
Wondering what I would do next , when I am done with this one :ermm:
January 21, 2013 at 12:12 am
Easy one, thanks 🙂
I selected the answers one could expect, because it would be pretty sad if they messed up a brand new function 😀
Need an answer? No, you need a question
My blog at https://sqlkover.com.
MCSE Business Intelligence - Microsoft Data Platform MVP
January 21, 2013 at 12:15 am
Lokesh Vij (1/20/2013)
Thanks Ron for another one on SS 2012!
+1
January 21, 2013 at 12:59 am
😉 good one.
(.. i didn't know the existence of EOMONTH till now; and the functions in the SQL mainly turn to pink color font by default, by seeing the T-SQL code initially felt like is this a trick question? and literally did the BOL search and yes.... there you are... 🙂 and understood that the IFCodes needs updating to the 2012 keywords... 😀 )
ww; Raghu
--
The first and the hardest SQL statement I have wrote- "select * from customers" - and I was happy and felt smart.
January 21, 2013 at 1:21 am
This question is better suited for http://www.GeographyCentral.com.
How does knowing the last day of February in 2016 have anything to do with SQL Server? I had to check a calendar in order to answer this question, books online was no good here.
January 21, 2013 at 2:24 am
This was removed by the editor as SPAM
January 21, 2013 at 2:49 am
Stewart "Arturius" Campbell (1/21/2013)
Good qurstion, Ron,Thanks
Sean Pearce (1/21/2013)
This question is better suited for http://www.GeographyCentral.com.How does knowing the last day of February in 2016 have anything to do with SQL Server? I had to check a calendar in order to answer this question, books online was no good here.
Point of note:
The EOMONTH function in Excel currently does not recognise leap years. Therefore, if this was an exact copy of the function as used in Excel, it would not work correctly.
Since when did SQL Server start copying Excel?
January 21, 2013 at 2:53 am
Sean Pearce (1/21/2013)
Since when did SQL Server start copying Excel?
Since SQL Server 2012 apparently 😉
Other functions "stolen" from other languages: choose, iif, format and concat
Need an answer? No, you need a question
My blog at https://sqlkover.com.
MCSE Business Intelligence - Microsoft Data Platform MVP
January 21, 2013 at 2:53 am
Sean Pearce (1/21/2013)
Since when did SQL Server start copying Excel?
It didn't (at least not the buggy version of the code that was distributed in Excel 97 and Excel 98 for Macintosh). But in SQL Server 2012, there are definitely a lot of new function that are totally useless - except if you want to enable an easier transition from VBA and Access SQL to T-SQL. EOMONTH is one of them, IIF is a very clear example, and I think there were a few more, but I don't have the time to hunt them all down now.
January 21, 2013 at 3:25 am
Hugo Kornelis (1/21/2013)
EOMONTH is one of them, IIF is a very clear example, and I think there were a few more, but I don't have the time to hunt them all down now.
I listed them at the same time you posted 😀
(apparently I do have the time to hunt them all down down :w00t:)
Most of the new TSQL functions are usability functions, in the sense that you could achieve the same in earlier versions of SQL Server, but with a more clever use of existing functions, such as dateadd.
Notable exceptions are OFFSET and FETCH, and the new windowing functions, which are awesome by the way.
Need an answer? No, you need a question
My blog at https://sqlkover.com.
MCSE Business Intelligence - Microsoft Data Platform MVP
January 21, 2013 at 4:58 am
Good to see another 2012 question. I hadn't read about Eomonth before, so had to read a BoL page and learn something new. 😎
It's mildly irritating though, having to work out what days of the week are 29 Feb 2016 and 31 Dec 2016 - the sort of thing that would tempt me to run the code if the version of of SQL Server I have (2008 R2) included Eomonth. 😉
edit: Like Koen, I assumed that the new function wouldn't be screwed up - after all, the date handling in earler versions recognised leap years OK, why would this new function in 2012 be different? (I wasn't aware of teh EXCEL function - so maybe that was an easier choice for me than for Koen :-D).
Tom
January 21, 2013 at 5:14 am
Sean Pearce (1/21/2013)
This question is better suited for http://www.GeographyCentral.com.How does knowing the last day of February in 2016 have anything to do with SQL Server? I had to check a calendar in order to answer this question, books online was no good here.
It would be sad if there was ever a book called, "Everything I Needed to Know I Learned in BOL"!
[font="Verdana"]Please don't go. The drones need you. They look up to you.[/font]
Connect to me on LinkedIn
Viewing 15 posts - 1 through 15 (of 25 total)
You must be logged in to reply to this topic. Login to reply