Viewing 15 posts - 31 through 45 (of 50 total)
Why re-post this article?
It does nothing to educate people about replacing cursors with efficient, set-based, code.
However, reading some of the excellent discussion after does 🙂
June 17, 2010 at 10:06 pm
Having a graphic doesn't stop you trying the code - typing it in actually aids the learning process, as you are processing what you are typing, rather than just seeing...
June 14, 2010 at 3:25 pm
Come on, give the guy a break - you can see that Null has been cropped off! Not another huge discussion on assumptions!
I am on the other side this...
June 13, 2010 at 9:35 pm
Thought this had been beaten to death... Time to unsubscribe as well!
March 16, 2010 at 2:14 pm
Maybe I've missed something, but I think at least 3 concrete suggestions have been given as how to alter the question...
So how about:
WITH Users(UserID, UserName) AS
(
SELECT TOP 1 intUserID,...
March 7, 2010 at 6:27 pm
And with a tiny bit more care in the preparation of the question, there would have been a lot more people appreciating it.
March 4, 2010 at 3:14 pm
JF1081 (3/4/2010)
antony-688446 (3/3/2010)
March 4, 2010 at 1:05 pm
Lynn Pettis (3/3/2010)
How about we put so much detail in the question that there is one and only one correct answer?
Surely that is the point of QotD?? :hehe:
March 3, 2010 at 3:53 pm
Agree that QOTD is supposed to be fun & educational, and not taken seriously, but should also be clear & unambiguous. After all, assumption is the Mother & Father of...
March 3, 2010 at 3:21 pm
I am on the 'poor question' side of this debate. Yes, read the code, make assumptions, and you get the right answer (not convinced its worth 2 points, as it...
March 3, 2010 at 2:00 pm
Excellent QotD. Grey matter exercise, rather than spot the illegal statement 🙂
February 16, 2010 at 2:00 pm
Alternatively, replace all the date calc code with:
select @qdt=dateadd(m,-1,dateadd(d,datediff(d,'1 Jan 1900',getdate()),'1 Jan 1900')-datepart(d,getdate())+1)
This returns the first day of the previous month, 12:00 am, as does the given script.
An explanation of...
January 19, 2010 at 1:42 pm
Feel cheated by this one, as the question should have been a 'Choose all that apply'. Making it multi-choice makes the answer obvious. This is really annoying when you have...
May 3, 2009 at 6:19 pm
Viewing 15 posts - 31 through 45 (of 50 total)