January 2, 2013 at 3:39 am
Very forgiving indeed.
SELECT MONTH('April' + ' 1900')
My thought question: Have you ever been told that your query runs too fast?
My advice:
INDEXing a poor-performing query is like putting sugar on cat food. Yeah, it probably tastes better but are you sure you want to eat it?
The path of least resistance can be a slippery slope. Take care that fixing your fixes of fixes doesn't snowball and end up costing you more than fixing the root cause would have in the first place.
Need to UNPIVOT? Why not CROSS APPLY VALUES instead?[/url]
Since random numbers are too important to be left to chance, let's generate some![/url]
Learn to understand recursive CTEs by example.[/url]
[url url=http://www.sqlservercentral.com/articles/St
February 9, 2017 at 12:29 am
madhu.gut - Thursday, May 6, 2010 1:34 AMHi AllHow should i convert the month name to month number like'April' it should converted to 4'January' it should converted to 1in this how should i do thiscan any one suggest the correct answer
February 9, 2017 at 12:30 am
SELECT DATEPART(MM,'january '+'01 1900')
SELECT MONTH('january ' + '01 1900')
SELECT month(dateadd(month,DATEDIFF(month,0,'january 01 2015'),0))
February 17, 2017 at 1:40 am
This was removed by the editor as SPAM
Viewing 4 posts - 16 through 18 (of 18 total)
You must be logged in to reply to this topic. Login to reply