SQLServerCentral.com / Article Discussions / Article Discussions by Author / Discuss content posted by Sajeev SL / Sort Order - Include Null al last / Latest PostsInstantForum.NET v2.9.0SQLServerCentral.comhttp://www.sqlservercentral.com/Forums/notifications@sqlservercentral.comTue, 31 Mar 2015 16:38:07 GMT20RE: Sort Order - Include Null al lasthttp://www.sqlservercentral.com/Forums/Topic521276-1322-1.aspxHi AllI have tested the query by creating the table.Select EmpName, DateOfLeaving from Employees order by DateOfLeaving desc, EmpName asc Only the above statement will return the required output.3rd option is the correct , not the 2nd option.Mon, 16 Mar 2009 01:31:05 GMTBalachandraRE: Sort Order - Include Null al lasthttp://www.sqlservercentral.com/Forums/Topic521276-1322-1.aspxJust because I a bit of a newbie with SQL in general. I created the table and poplulated. Verified I had the right value and in SQL Server 2005 the statment 'SELECT EmpName, DateOfLeaving from #Employees ORDER BY DateOfLeaving DESC, EmpName ASC' got the correct answer.I did not try the supposed solution.Thanks.Tue, 25 Nov 2008 09:24:06 GMTkevlrayRE: Sort Order - Include Null al lasthttp://www.sqlservercentral.com/Forums/Topic521276-1322-1.aspxThe given answer here is wrong which is not displaying the dateofleaving in ascending order. I think the correct answer is,select * from employees order by dateofleaving desc,empname ascSun, 06 Jul 2008 23:24:00 GMTakila.purushothamanRE: Sort Order - Include Null al lasthttp://www.sqlservercentral.com/Forums/Topic521276-1322-1.aspx[quote][b]Anirban Paul (6/25/2008)[/b][hr]Cheers to Steve.........:)I believe u are not going to deduct points for posting here ;)[/quote]Now [b][i]that's[/i][/b] an idea...... :cool:Thu, 26 Jun 2008 00:55:51 GMTmajorbloodnockRE: Sort Order - Include Null al lasthttp://www.sqlservercentral.com/Forums/Topic521276-1322-1.aspxCheers to Steve.........:)I believe u are not going to deduct points for posting here ;)Wed, 25 Jun 2008 22:40:27 GMTAnipaulRE: Sort Order - Include Null al lasthttp://www.sqlservercentral.com/Forums/Topic521276-1322-1.aspxPoints are awarded back.Apologies for the delay. I was on vacation and this was one thing that no one else knows how to do (yet).The run through of the question appeared to be correct, but I think I, like the author, was watching the date fields only and not the text fields. No excuse, but mistakes happen.Also, the single quotes are sometimes a result of the #$%$@#@ editor used. It changes proper SQL single quotes to grammatically correct ones that don't work in QA. Please ignore those.Wed, 25 Jun 2008 14:41:22 GMTSteve Jones - SSC EditorRE: Sort Order - Include Null al lasthttp://www.sqlservercentral.com/Forums/Topic521276-1322-1.aspxSeriously guys, I can't believe you are all talking about this still. I think its time to move on. There are more fun and exciting things going on in the SQL Server world. :DWed, 25 Jun 2008 13:15:47 GMTWill StruttsRE: Sort Order - Include Null al lasthttp://www.sqlservercentral.com/Forums/Topic521276-1322-1.aspxI hear you Lynn... I just think we're clashing on a difference of either specific values or perspective. My values say that if I were going to run SSC, I could not and would not accept a QOTD that wasn't reviewed and vetted by several other people beyond the author, and those doing the vetting wouldn't be able to participate in any QOTD they vetted. The vetters would likely include several of the best site participants, and I would hope for a pool of vetters such that I could rotate among different sets of vetters for each QOTD. It's also quite likely I would make that process weekly instead of daily, as daily deadlines are very difficult to meet with just one person involved, never mind a larger pool.My perspective says I simply can't imagine implementing anything like QOTD in any way that was WITHOUT the caveats I specified above, nor can I imagine anyone else being willing to do so without them, as the whining and complaining that would certainly ensue would only hurt the site's reputation, and I cannot see any way to make up for that kind of a loss that makes doing a QOTD type of thing worth the effort. This is primarily because I would know ahead of time the kind of grief involved in having to fix problems and listen to gripes and whines, AND, that just setting up the coding on who could participate in any given question would not be trivial. Again, just my perspective. Besides, my mother always told me that if you're going to do something, do it well. My version of "do it well" requires more effort than others might envision, but I know from experience that it tends to produce good results.Steve(aka smunson):):):)Wed, 25 Jun 2008 12:59:08 GMTsgmunsonRE: Sort Order - Include Null al lasthttp://www.sqlservercentral.com/Forums/Topic521276-1322-1.aspx[quote]Steve(aka smunson)[/quote]First, Steve probably hasn't seen this thread yet, as he may be off at a conference. I know that when he learns about an issue such as this, he takes the appropriate action and makes the necessary corrections and sends out his apologies. The constant complaining about not getting "my points back" over and over is whining. Do these points really mean anything? Does the fact you didn't get awarded a point really going to matter next week, or next year? Is it going to cost you your job? Come on, if we are all professionals, like we say we are, we need to step up and realize that things go wrong, and whining about it isn't going to make it better.Yes, individuals like Jeff, Grant, Gail, et al preach do it right from the beginning. But I can assure you, they make mistakes as well. Part of that is called development, or experimentation. Has any one out there written the perfect nontrivial sql query/store procedure/trigger/... the first time they sat down to write it? Probably not. Sometimes the first iteration my be a slow ponderous beast that returns the correct answer. Now the goal is to improve the process, find the better solution before going into production. I'm sure that some of the guru's out there can do this faster than others (a matter of experience).I also place the constant complaining about bad questions/answers as complaining. All I can say is it happens, get over it. We may not have the time to volunteer and vet questions, but how about stepping up to the plate and providing some QotD instead? Do I think I could do a better job than some of the others I have seen? Possibly, depends on what topic I would choose. I just haven't taken the time to try and write one. But there is another difference, I'm not one of those complaining about the bad questions/answers all the time. (No, I am just complaining about the complainers because that bothers me more than the bad questions/answers.)I may, in the near future, try my hand at writing a QotD. I finally took the time to write an article for SSC (and it will be published shortly), and I am in the process of writing another one. I'm sure I will get some flames on my article, but I also know that others will provide valuable feedback (contractive criticism) which I will welcome.:cool:Wed, 25 Jun 2008 10:28:07 GMTLynn PettisRE: Sort Order - Include Null al lasthttp://www.sqlservercentral.com/Forums/Topic521276-1322-1.aspxWhile I understand your point, why diminish the value of SSC by allowing something like QOTD to go so far off kilter? Perhaps it's time to consider making it the QOTW (weekly) or QOTM (monthly), in order to insure that the time necessary to get it right can be actually be spent?Also, I suggested a solution - it was called fixing it by doing the right thing for the right reason(remove the bad question and restore the points for all correct answerers and issue the mea culpas). What concerns me is being lumped into the whiners category. QOTD requires some amount of resource to be done correctly, and all I ask is that either the resource be provided or someone step up to the plate to state that the resources simply aren't available and scale back the implementation to meet available resources. Isn't that what the likes of Grant Fritchey, Jeff Moden, Matt Miller, and so many others preach in their posts with respect to SQL and DBA job skills? Why should the operation of this website be any different?Steve(aka smunson):):):)[quote][b]Lynn Pettis (6/25/2008)[/b][hr][quote][b]smunson (6/25/2008)[/b][hr][quote][b]majorbloodnock (6/25/2008)[/b][hr][quote][b]smunson (6/25/2008)[/b][hr]A.) No judgement was made, was just posing a question.[/quote]OK. That's the way it came across, but I'm happy to apologise if that wasn't your intention and I've misunderstood.[/quote]It wasn't my intention to do any more than make folks think about the question. Thanks![quote][b]majorbloodnock (6/25/2008)[/b][hr][quote]B.) You ask for no judgement on what hasn't yet been done, and then go on to try and justify why what may or may not take place could be a reasonable choice?[/quote]Not at all. I have made no justification whatsoever; merely summarised what has been said before. No more, no less. I'm happy to see Steve praised or damned for what he has said or done, but not for what he has not, so it seemed sensible to set out exactly those points. If you're reading more into my comment than that, I suspect you're falling into the same trap I just fell into above (regarding your A.) point). Since I've just done it, I can vouch for how easy it is to do ;)[/quote]Yes, you summarized, but since all I had were the words you provided, sans any statement that says you are just summarizing, it would be pretty hard to infer any intent other than a justification, and thus I apologize for the misinterpretation, as I recognize the difficulty in translating thought and intent to the written word.[quote][b]majorbloodnock (6/25/2008)[/b][hr]As for the rest, perhaps the QOTD is becoming a lot of trouble. The forum is a free resource, so there's a limit to the effort we can expect to be put in. Whether or not "a lot of trouble" is now "too much trouble" is pure conjecture, but I'd imagine the more people take it too seriously, the higher that "too much trouble" score will creep compared with the value the forum and its members get out of the QOTD resource.And I agree that mistakes in the QOTDs aren't doing SSC any favours.[/quote]And here you go back in the same direction as you appeared to be going before - suddenly the QOTD is potentially more trouble than it's worth, and I have to say that the very existence of this debate over it's value is proof enough of it's value.It just seems that some folks have so little intolerance for ANYTHING that even remotely resembles a negative thought, that they'll settle for less than they deserve merely to avoid conflict. That just seems to me to be less than appropriate where something of significant value is concerned. It's not the conflict that's the important thing, it's how one resolves it.And I agree with you wholeheartedly on the QOTD boo-boos not doing SSC any favors (American spelling). It's because I highly value SSC that I choose some level of conflict lest that valuable resource become less valuable.Steve(aka smunson):):):)P.S. to Lynn Pettis - I would choose not to volunteer myself for something of the nature of QOTD - not because of the potential for user complaint, but merely because I have very little time for any kind of volunteer effort, much less something with a daily deadline that's based on a time zone from across the pond. IOW, I simply do not have the time. My point was that whatever the time requirement or level of negative feedback, whomever IS doing it CAN be expected to do it right and take care of it professionally. If the number of problems were minimal, then this would likely have been a rather odd occurrence instead of a much larger issue.[/quote]Just as I don't have time either, understood. The real point here, is that too many people complain excessivily, don't offer any solutions to help out, and if asked to assist propably wouldn't, even if they had the time. The attitude today is everything should be perfect always, and anything else is unexceptable. The problem with that, however, is that is not possible. Mistakes will happen, and with the QotD, bad questions and/or answers will occur. I have no problems with the problem being brought to the communities attention, but when you read nothing but complaints and whining from everyone, it gets to the point of the ridiculous.The QotD is, and I am definitely repeating myself, not the meat of this site. I enjoy reading and answering the QotD, some of them make me think, some teach, some reinforce what I already know, but it isn't why I come to this site. I have learned so much more from the forums than I ever could from OJT or learning on my own. I have found new ways of thinking about problems and new solutions to old ones I had fixed (some have actually been better). And, more importantly, I have been giving back to this community for all the help it has given me.I feel that I have made some friends on this site as well. There are quite a few people here that I would like to someday meet in person. Some live here in the States, and some overseas. But even if that never happens, they are still here, and I can rely on their experience and wisdom. Regardless of the QotD, the forums and the people are what make this site one of the best resources for SQL Server on the web today.:cool:[/quote]Wed, 25 Jun 2008 08:42:04 GMTsgmunsonRE: Sort Order - Include Null al lasthttp://www.sqlservercentral.com/Forums/Topic521276-1322-1.aspxLynn,Well put. I couldn't have said it better myself.(I considered doing a quoted reply, but I wasn't sure whether or not we get points for acreage.):DWed, 25 Jun 2008 07:52:46 GMTTom GarthRE: Sort Order - Include Null al lasthttp://www.sqlservercentral.com/Forums/Topic521276-1322-1.aspx[quote][b]smunson (6/25/2008)[/b][hr][quote][b]majorbloodnock (6/25/2008)[/b][hr][quote][b]smunson (6/25/2008)[/b][hr]A.) No judgement was made, was just posing a question.[/quote]OK. That's the way it came across, but I'm happy to apologise if that wasn't your intention and I've misunderstood.[/quote]It wasn't my intention to do any more than make folks think about the question. Thanks![quote][b]majorbloodnock (6/25/2008)[/b][hr][quote]B.) You ask for no judgement on what hasn't yet been done, and then go on to try and justify why what may or may not take place could be a reasonable choice?[/quote]Not at all. I have made no justification whatsoever; merely summarised what has been said before. No more, no less. I'm happy to see Steve praised or damned for what he has said or done, but not for what he has not, so it seemed sensible to set out exactly those points. If you're reading more into my comment than that, I suspect you're falling into the same trap I just fell into above (regarding your A.) point). Since I've just done it, I can vouch for how easy it is to do ;)[/quote]Yes, you summarized, but since all I had were the words you provided, sans any statement that says you are just summarizing, it would be pretty hard to infer any intent other than a justification, and thus I apologize for the misinterpretation, as I recognize the difficulty in translating thought and intent to the written word.[quote][b]majorbloodnock (6/25/2008)[/b][hr]As for the rest, perhaps the QOTD is becoming a lot of trouble. The forum is a free resource, so there's a limit to the effort we can expect to be put in. Whether or not "a lot of trouble" is now "too much trouble" is pure conjecture, but I'd imagine the more people take it too seriously, the higher that "too much trouble" score will creep compared with the value the forum and its members get out of the QOTD resource.And I agree that mistakes in the QOTDs aren't doing SSC any favours.[/quote]And here you go back in the same direction as you appeared to be going before - suddenly the QOTD is potentially more trouble than it's worth, and I have to say that the very existence of this debate over it's value is proof enough of it's value.It just seems that some folks have so little intolerance for ANYTHING that even remotely resembles a negative thought, that they'll settle for less than they deserve merely to avoid conflict. That just seems to me to be less than appropriate where something of significant value is concerned. It's not the conflict that's the important thing, it's how one resolves it.And I agree with you wholeheartedly on the QOTD boo-boos not doing SSC any favors (American spelling). It's because I highly value SSC that I choose some level of conflict lest that valuable resource become less valuable.Steve(aka smunson):):):)P.S. to Lynn Pettis - I would choose not to volunteer myself for something of the nature of QOTD - not because of the potential for user complaint, but merely because I have very little time for any kind of volunteer effort, much less something with a daily deadline that's based on a time zone from across the pond. IOW, I simply do not have the time. My point was that whatever the time requirement or level of negative feedback, whomever IS doing it CAN be expected to do it right and take care of it professionally. If the number of problems were minimal, then this would likely have been a rather odd occurrence instead of a much larger issue.[/quote]Just as I don't have time either, understood. The real point here, is that too many people complain excessivily, don't offer any solutions to help out, and if asked to assist propably wouldn't, even if they had the time. The attitude today is everything should be perfect always, and anything else is unexceptable. The problem with that, however, is that is not possible. Mistakes will happen, and with the QotD, bad questions and/or answers will occur. I have no problems with the problem being brought to the communities attention, but when you read nothing but complaints and whining from everyone, it gets to the point of the ridiculous.The QotD is, and I am definitely repeating myself, not the meat of this site. I enjoy reading and answering the QotD, some of them make me think, some teach, some reinforce what I already know, but it isn't why I come to this site. I have learned so much more from the forums than I ever could from OJT or learning on my own. I have found new ways of thinking about problems and new solutions to old ones I had fixed (some have actually been better). And, more importantly, I have been giving back to this community for all the help it has given me.I feel that I have made some friends on this site as well. There are quite a few people here that I would like to someday meet in person. Some live here in the States, and some overseas. But even if that never happens, they are still here, and I can rely on their experience and wisdom. Regardless of the QotD, the forums and the people are what make this site one of the best resources for SQL Server on the web today.:cool:Wed, 25 Jun 2008 07:45:12 GMTLynn PettisRE: Sort Order - Include Null al lasthttp://www.sqlservercentral.com/Forums/Topic521276-1322-1.aspx[quote][b]majorbloodnock (6/25/2008)[/b][hr][quote][b]smunson (6/25/2008)[/b][hr]A.) No judgement was made, was just posing a question.[/quote]OK. That's the way it came across, but I'm happy to apologise if that wasn't your intention and I've misunderstood.[/quote]It wasn't my intention to do any more than make folks think about the question. Thanks![quote][b]majorbloodnock (6/25/2008)[/b][hr][quote]B.) You ask for no judgement on what hasn't yet been done, and then go on to try and justify why what may or may not take place could be a reasonable choice?[/quote]Not at all. I have made no justification whatsoever; merely summarised what has been said before. No more, no less. I'm happy to see Steve praised or damned for what he has said or done, but not for what he has not, so it seemed sensible to set out exactly those points. If you're reading more into my comment than that, I suspect you're falling into the same trap I just fell into above (regarding your A.) point). Since I've just done it, I can vouch for how easy it is to do ;)[/quote]Yes, you summarized, but since all I had were the words you provided, sans any statement that says you are just summarizing, it would be pretty hard to infer any intent other than a justification, and thus I apologize for the misinterpretation, as I recognize the difficulty in translating thought and intent to the written word.[quote][b]majorbloodnock (6/25/2008)[/b][hr]As for the rest, perhaps the QOTD is becoming a lot of trouble. The forum is a free resource, so there's a limit to the effort we can expect to be put in. Whether or not "a lot of trouble" is now "too much trouble" is pure conjecture, but I'd imagine the more people take it too seriously, the higher that "too much trouble" score will creep compared with the value the forum and its members get out of the QOTD resource.And I agree that mistakes in the QOTDs aren't doing SSC any favours.[/quote]And here you go back in the same direction as you appeared to be going before - suddenly the QOTD is potentially more trouble than it's worth, and I have to say that the very existence of this debate over it's value is proof enough of it's value.It just seems that some folks have so little intolerance for ANYTHING that even remotely resembles a negative thought, that they'll settle for less than they deserve merely to avoid conflict. That just seems to me to be less than appropriate where something of significant value is concerned. It's not the conflict that's the important thing, it's how one resolves it.And I agree with you wholeheartedly on the QOTD boo-boos not doing SSC any favors (American spelling). It's because I highly value SSC that I choose some level of conflict lest that valuable resource become less valuable.Steve(aka smunson):):):)P.S. to Lynn Pettis - I would choose not to volunteer myself for something of the nature of QOTD - not because of the potential for user complaint, but merely because I have very little time for any kind of volunteer effort, much less something with a daily deadline that's based on a time zone from across the pond. IOW, I simply do not have the time. My point was that whatever the time requirement or level of negative feedback, whomever IS doing it CAN be expected to do it right and take care of it professionally. If the number of problems were minimal, then this would likely have been a rather odd occurrence instead of a much larger issue.Wed, 25 Jun 2008 07:23:24 GMTsgmunsonRE: Sort Order - Include Null al lasthttp://www.sqlservercentral.com/Forums/Topic521276-1322-1.aspx[quote][b]smunson (6/25/2008)[/b][hr]A.) No judgement was made, was just posing a question.[/quote]OK. That's the way it came across, but I'm happy to apologise if that wasn't your intention and I've misunderstood.[quote]B.) You ask for no judgement on what hasn't yet been done, and then go on to try and justify why what may or may not take place could be a reasonable choice?[/quote]Not at all. I have made no justification whatsoever; merely summarised what has been said before. No more, no less. I'm happy to see Steve praised or damned for what he has said or done, but not for what he has not, so it seemed sensible to set out exactly those points. If you're reading more into my comment than that, I suspect you're falling into the same trap I just fell into above (regarding your A.) point). Since I've just done it, I can vouch for how easy it is to do ;)As for the rest, perhaps the QOTD is becoming a lot of trouble. The forum is a free resource, so there's a limit to the effort we can expect to be put in. Whether or not "a lot of trouble" is now "too much trouble" is pure conjecture, but I'd imagine the more people take it too seriously, the higher that "too much trouble" score will creep compared with the value the forum and its members get out of the QOTD resource.And I agree that mistakes in the QOTDs aren't doing SSC any favours.Wed, 25 Jun 2008 06:55:42 GMTmajorbloodnockRE: Sort Order - Include Null al lasthttp://www.sqlservercentral.com/Forums/Topic521276-1322-1.aspxThen I will make the assumption that you'll be the first to volunteer to vet future QotD and willing to stick with it through thick and thin. I would consider it, but I also know that between my work and my life, I don't know how much time I have extra to be a part of such a group.P.S. I also care, and realize that the QotD is much more of a fun sideline than a serious educational aspect of this site. Look back at some of the humorous QotD that have been given.The meat of this site are the forums and its participants, not the QotD.:cool:[quote][b]smunson (6/25/2008)[/b][hr]A.) No judgement was made, was just posing a question.B.) You ask for no judgement on what hasn't yet been done, and then go on to try and justify why what may or may not take place could be a reasonable choice? One might as well say that supporting a QoTD feature is just too much trouble - to which I will respond that anyone having sufficient experience in a forum environment to justify getting seriously involved in supporting one in any fashion, ought to know what's involved AS WELL AS what's expected long before beginning, and be capable of brushing off any negative press and moving on without a hitch. What you're suggesting says that such a person shouldn't or couldn't be expected to behave in that kind of PROFESSIONAL manner, and I beg to differ. The simple fact is that getting it right IS sometimes the most important thing - especially when you have perhaps thousands of folks relying on you to do so. Whenever a website shows any consistent signs of not being reliable, it's reputation suffers significantly, and most folks know this and thus make their voices loud in order that they be heard and responded to, so as to help avoid the loss they might incur if said site suddenly became less available or otherwise impaired by reputation. Make sense?Steve(aka smunson):):):)P.S. It's because we care !!![quote][b]majorbloodnock (6/25/2008)[/b][hr][quote][b]smunson (6/24/2008)[/b][hr]If their reaction is that childish, then where's the professionalism associated with publishing a website of this caliber? You can't be a pro and then react to every user disappointment in your site as if you're just going to take your ball and go home.[/quote]Please don't judge someone on what they haven't yet done - especially when there's no legitimate hint that it even will be done.Steve hasn't stopped the QOTD. He hasn't threatened to stop the QOTD. He [b]has[/b] said there's a lot more work than is apparent in sanity checking a QOTD. He [b]has[/b] said the amount of SSC's daily time that can be devoted to the QOTDs is less than is necessary to guarantee problem-free questions. He [b]has[/b] said that if we want decent questions then more of us should step up to the mark and propose some.[/quote][/quote]Wed, 25 Jun 2008 06:53:24 GMTLynn PettisRE: Sort Order - Include Null al lasthttp://www.sqlservercentral.com/Forums/Topic521276-1322-1.aspxA.) No judgement was made, was just posing a question.B.) You ask for no judgement on what hasn't yet been done, and then go on to try and justify why what may or may not take place could be a reasonable choice? One might as well say that supporting a QoTD feature is just too much trouble - to which I will respond that anyone having sufficient experience in a forum environment to justify getting seriously involved in supporting one in any fashion, ought to know what's involved AS WELL AS what's expected long before beginning, and be capable of brushing off any negative press and moving on without a hitch. What you're suggesting says that such a person shouldn't or couldn't be expected to behave in that kind of PROFESSIONAL manner, and I beg to differ. The simple fact is that getting it right IS sometimes the most important thing - especially when you have perhaps thousands of folks relying on you to do so. Whenever a website shows any consistent signs of not being reliable, it's reputation suffers significantly, and most folks know this and thus make their voices loud in order that they be heard and responded to, so as to help avoid the loss they might incur if said site suddenly became less available or otherwise impaired by reputation. Make sense?Steve(aka smunson):):):)P.S. It's because we care !!![quote][b]majorbloodnock (6/25/2008)[/b][hr][quote][b]smunson (6/24/2008)[/b][hr]If their reaction is that childish, then where's the professionalism associated with publishing a website of this caliber? You can't be a pro and then react to every user disappointment in your site as if you're just going to take your ball and go home.[/quote]Please don't judge someone on what they haven't yet done - especially when there's no legitimate hint that it even will be done.Steve hasn't stopped the QOTD. He hasn't threatened to stop the QOTD. He [b]has[/b] said there's a lot more work than is apparent in sanity checking a QOTD. He [b]has[/b] said the amount of SSC's daily time that can be devoted to the QOTDs is less than is necessary to guarantee problem-free questions. He [b]has[/b] said that if we want decent questions then more of us should step up to the mark and propose some.[/quote]Wed, 25 Jun 2008 06:34:32 GMTsgmunsonRE: Sort Order - Include Null al lasthttp://www.sqlservercentral.com/Forums/Topic521276-1322-1.aspxExtremely poor. I had ticked the second one and got it wrong when it's clearly right, as demonstrated in this thread.Wed, 25 Jun 2008 05:55:31 GMTDave F-425609RE: Sort Order - Include Null al lasthttp://www.sqlservercentral.com/Forums/Topic521276-1322-1.aspxI know I picked the 2nd one too....Wed, 25 Jun 2008 04:18:33 GMTSuperDBA-207096RE: Sort Order - Include Null al lasthttp://www.sqlservercentral.com/Forums/Topic521276-1322-1.aspxOk, I think next QotD could be "how to write a query to increase the scores of those who (correctly) answered just 2 to today's QotD?"Wed, 25 Jun 2008 03:40:53 GMTdavidthegrayRE: Sort Order - Include Null al lasthttp://www.sqlservercentral.com/Forums/Topic521276-1322-1.aspx[quote][b]brewmanz (6/24/2008)[/b][hr][quote][b]Anirban Paul (6/24/2008)[/b][hr]U people earned more than one point by posting your fustration over the question. So why complain? ;)[/quote]I don't understand what you mean. My posting, 2 days ago, was about the 8th complaint, and my answer is still marked as wrong. Doesn't this mean that I've yet to have my point credited? How do I earn 'more than one point' with it?[/quote]The QotD awards points for correct answers and you also get 1 point every time you post to the forums. Hence you've gained points by noting that the answer is wrong.Wed, 25 Jun 2008 02:42:54 GMTStarNamerRE: Sort Order - Include Null al lasthttp://www.sqlservercentral.com/Forums/Topic521276-1322-1.aspx[quote][b]smunson (6/24/2008)[/b][hr]If their reaction is that childish, then where's the professionalism associated with publishing a website of this caliber? You can't be a pro and then react to every user disappointment in your site as if you're just going to take your ball and go home.[/quote]Please don't judge someone on what they haven't yet done - especially when there's no legitimate hint that it even will be done.Steve hasn't stopped the QOTD. He hasn't threatened to stop the QOTD. He [b]has[/b] said there's a lot more work than is apparent in sanity checking a QOTD. He [b]has[/b] said the amount of SSC's daily time that can be devoted to the QOTDs is less than is necessary to guarantee problem-free questions. He [b]has[/b] said that if we want decent questions then more of us should step up to the mark and propose some.Wed, 25 Jun 2008 01:15:03 GMTmajorbloodnockRE: Sort Order - Include Null al lasthttp://www.sqlservercentral.com/Forums/Topic521276-1322-1.aspxCorrect Ans is only option #2, please see below queries. Output does not match with the desired output of question. PLEASE REMOVE "The solution should be:" FROM THE QUESTION. Such question must not be kept... THIS IS NOT FAIR...Create Table Employees (EmpName varchar(50), DateOfLeaving datetime)Insert into Employees values ('Abc', '10/Oct/1999')Insert into Employees values ('Bcd', '11/Nov/1998')Insert into Employees values ('Ccd', Null)Insert into Employees values ('Dcd', '10/Aug/2000')Insert into Employees values ('Eed', Null)select EmpName, DateOfLeaving from Employees order by IsNull(DateOfLeaving,'10/10/9999'), empNameSelect EmpName, DateOfLeaving from Employees order by DateOfLeaving desc, EmpName asc output of above two select statements are :EmpName DateOfLeaving Bcd 11/11/1998Abc 10/10/1999Dcd 8/10/2000Ccd NULLEed NULLEmpName DateOfLeaving Dcd 8/10/2000Abc 10/10/1999Bcd 11/11/1998Ccd NULLEed NULLWed, 25 Jun 2008 00:02:00 GMTPraveen JainRE: Sort Order - Include Null al lasthttp://www.sqlservercentral.com/Forums/Topic521276-1322-1.aspxI also got surprised when after answering it says me U R Wrong. Then i tried the same with my own example and found I was right.Wed, 25 Jun 2008 00:01:08 GMTrabinarayana_pRE: Sort Order - Include Null al lasthttp://www.sqlservercentral.com/Forums/Topic521276-1322-1.aspx[quote][b]Anirban Paul (6/24/2008)[/b][hr]U people earned more than one point by posting your fustration over the question. So why complain? ;)[/quote]I don't understand what you mean. My posting, 2 days ago, was about the 8th complaint, and my answer is still marked as wrong. Doesn't this mean that I've yet to have my point credited? How do I earn 'more than one point' with it?Tue, 24 Jun 2008 23:50:58 GMTbrewmanzRE: Sort Order - Include Null al lasthttp://www.sqlservercentral.com/Forums/Topic521276-1322-1.aspxI agree.Only the second option will give the desired result.Below is the set of results we'll get after executing all the 3 options:create table #temp1(EmpName nvarchar(200),DateOfLeaving Datetime)insert into #temp1 values('Abc', '10 Oct 1999')insert into #temp1 values('Bcd', '11 Nov 1998')insert into #temp1 values('Ccd', null)insert into #temp1 values('Dcd', '10 Aug 2000')insert into #temp1 values('Eed', null)Select * from #temp1/* 1 */Select EmpName, DateOfLeaving from #temp1 order by DateOfLeaving desc, EmpName asc /*EmpName DateOfLeavingDcd 2000-08-10 00:00:00.000Abc 1999-10-10 00:00:00.000Bcd 1998-11-11 00:00:00.000Ccd NULLEed NULL*//* 2 */Select EmpName, DateOfLeaving from #temp1 order by DateOfLeaving, EmpName asc/*EmpName DateOfLeavingCcd NULLEed NULLBcd 1998-11-11 00:00:00.000Abc 1999-10-10 00:00:00.000Dcd 2000-08-10 00:00:00.000*//* 3 */Select EmpName, DateOfLeaving from #temp1 order by isnull(DateOfLeaving,'10/10/9999'),EmpName asc /*EmpName DateOfLeavingBcd 1998-11-11 00:00:00.000Abc 1999-10-10 00:00:00.000Dcd 2000-08-10 00:00:00.000Ccd NULLEed NULL*/Drop table #temp1Tue, 24 Jun 2008 23:30:57 GMTvishal.kapoor2007RE: Sort Order - Include Null al lasthttp://www.sqlservercentral.com/Forums/Topic521276-1322-1.aspxU people earned more than one point by posting your fustration over the question. So why complain? ;)Tue, 24 Jun 2008 22:28:24 GMTAnipaulRE: Sort Order - Include Null al lasthttp://www.sqlservercentral.com/Forums/Topic521276-1322-1.aspxThe Suicide Hotline was busy, what's a maniac to do! I didn't get my [b]point[/b] back, so I am suffering depression. I'll try slicing my wrists this time, maybe that'll work.:crazy:Tue, 24 Jun 2008 21:18:56 GMTLarry BriscoeRE: Sort Order - Include Null al lasthttp://www.sqlservercentral.com/Forums/Topic521276-1322-1.aspxI another thing is that instead of complaining about wrong answers to QotD and demanding points back because the answer(s) were wrong (as in this case) or the question was poorly written (i.e. the user didn't understand it), they could just post a simple a message that indicated "Oh, I got it wrong, but it may have been I didn't understand it right" or "Oh, I got it wrong and it appears that one or more of the 'correct' answers may be wrong." and leave it at that.Someone talked about professionalism? How about the users showing some as well. It doesn't appear to be very professional to complain like some have here in a very public forum. Remember, it is quite easy to find people and what they have posted by just using Google.And to set the record straight, I am just as guilty as others having done the same on a couple of questions myself. I can say I haven't complained here, as I thought better after reading the question, the answers, and seeing that they were checkboxes instead of radio buttons. Just a slight clue that something may be a miss. I have seen a question with checkboxes that didn't have at least 2 correct responses.:cool:Tue, 24 Jun 2008 17:22:16 GMTLynn PettisRE: Sort Order - Include Null al lasthttp://www.sqlservercentral.com/Forums/Topic521276-1322-1.aspxI suppose we could probably put our subscription fees to better use.:smooooth:Tue, 24 Jun 2008 15:42:12 GMTTom GarthRE: Sort Order - Include Null al lasthttp://www.sqlservercentral.com/Forums/Topic521276-1322-1.aspxIf their reaction is that childish, then where's the professionalism associated with publishing a website of this caliber? You can't be a pro and then react to every user disappointment in your site as if you're just going to take your ball and go home. The one and only correct response is to rectify the error, add a few hundred thousand mea culpas, and move on, none the worse for wear.Anything less than that and now emotion is in control of the website instead of logic and reason. Right?Steve(aka smunson):):):)[quote][b]Tom Garth (6/24/2008)[/b][hr]Steve must be off for a couple of days. The newsletter was published today, but I didn't get it by email. The editorial was by Tony. After he sees this tirade over a trivial error, he might just quit having a QotD.[/quote]Tue, 24 Jun 2008 15:19:18 GMTsgmunsonRE: Sort Order - Include Null al lasthttp://www.sqlservercentral.com/Forums/Topic521276-1322-1.aspxSteve must be off for a couple of days. The newsletter was published today, but I didn't get it by email. The editorial was by Tony. After he sees this tirade over a trivial error, he might just quit having a QotD.Tue, 24 Jun 2008 13:45:45 GMTTom GarthRE: Sort Order - Include Null al lasthttp://www.sqlservercentral.com/Forums/Topic521276-1322-1.aspxI don't think Steve is going to give us our points back. I'm not even sure if he's aware that we are all complaining about the second incorrect answer to a question in a week. As a matter of fact, both times the next day's email still had the incorrect answer in it.Tue, 24 Jun 2008 13:40:02 GMTSteve EckhartRE: Sort Order - Include Null al lasthttp://www.sqlservercentral.com/Forums/Topic521276-1322-1.aspxGreat question. But I want my points because only the second option was correct and the explanation says that both option 2 [b]and 3 [/b]where ok. I don't consider option 3 as a valid answer.Thanks, Marcos.Tue, 24 Jun 2008 13:05:28 GMTmarcoscRE: Sort Order - Include Null al lasthttp://www.sqlservercentral.com/Forums/Topic521276-1322-1.aspxIt's answer is wrong!!Select EmpName, DateOfLeaving from Employees order by DateOfLeaving desc, EmpName asc This query returns descending Order of DateOfLeaving.It is so clear!!wrong answer.!!Tue, 24 Jun 2008 09:57:02 GMTSimon ChoRE: Sort Order - Include Null al lasthttp://www.sqlservercentral.com/Forums/Topic521276-1322-1.aspxI only have 6 pages here... not to say that showing 100 post on a page would even lower their number :D( just kidding ;) )I'm faithful too that someone sooner or later will fix that horrible red cross and put the right green mark :)Have a nice day!PS: I re-read the answer that the author gave:[i]In SQL Server T-SQL, by default, a query takes null as first when the order is ascending (the default). So we just give some value of greater date in order by so that it will come at last. [/i]That seems quite clear, he probably ticked solution #3 as correct by accident, as a matter of fact everything else leads in the right direction :)Tue, 24 Jun 2008 08:57:26 GMTluca.pierobonRE: Sort Order - Include Null al lasthttp://www.sqlservercentral.com/Forums/Topic521276-1322-1.aspxI don't doubt you're right, Skyline.OK, 17 pages, here we come ;)Tue, 24 Jun 2008 06:36:35 GMTmajorbloodnockRE: Sort Order - Include Null al lasthttp://www.sqlservercentral.com/Forums/Topic521276-1322-1.aspx[quote][b]majorbloodnock (6/24/2008)[/b][hr]Well, I think we all now know that there are a couple of issues with the question and answer, that the author has willingly admitted this, and that SSC has an issue with the amount of time necessary for proof-reading what is, eventually, an informative bit of fun.However, does no-one see the irony with the posting of "why wasn't this QOTD proof-read" several pages after the same issue was first raised? Obviously, this doesn't encompass everyone who's answered in this thread, but how can someone demand better proof-reading if they themselves don't bother reading the preceding pages of the thread to see if their point has already been made?Personally, I expect that, when Steve comes online, the "wrong" answers will be amended to "right" answers. After all, he's been pretty good at resolving these issues before, so why should this be different?[/quote]I think people are simply repeating the point so that they are heard as well, and with more people saying the same thing, then something might be done about it. Also, they wanted to have their point from the post seeing as they didn't get the point from the QotD ;)Tue, 24 Jun 2008 06:27:48 GMTskyline666RE: Sort Order - Include Null al lasthttp://www.sqlservercentral.com/Forums/Topic521276-1322-1.aspxWell, I think we all now know that there are a couple of issues with the question and answer, that the author has willingly admitted this, and that SSC has an issue with the amount of time necessary for proof-reading what is, eventually, an informative bit of fun.However, does no-one see the irony with the posting of "why wasn't this QOTD proof-read" several pages after the same issue was first raised? Obviously, this doesn't encompass everyone who's answered in this thread, but how can someone demand better proof-reading if they themselves don't bother reading the preceding pages of the thread to see if their point has already been made?Personally, I expect that, when Steve comes online, the "wrong" answers will be amended to "right" answers. After all, he's been pretty good at resolving these issues before, so why should this be different?Tue, 24 Jun 2008 06:18:34 GMTmajorbloodnockRE: Sort Order - Include Null al lasthttp://www.sqlservercentral.com/Forums/Topic521276-1322-1.aspxDear bitbucket,Just copy and paste the T-SQL code written in my post and just execute it. You 'll get right answer.Alternativelty you can copy the second option and remove single quote and place the single quote again. I think it 'll work fine.:)Mon, 23 Jun 2008 23:02:20 GMTHari.SharmaRE: Sort Order - Include Null al lasthttp://www.sqlservercentral.com/Forums/Topic521276-1322-1.aspxWhat can I say more? I am in 94% as well.:hehe:Mon, 23 Jun 2008 22:08:34 GMTmagasvs