I have answered this question, initially believing it was asked for MS SQL Server. It's possible to see my comment asking for this point in the question comments, I usually do it when I do not see the tag. So, I posted my answer, fully tested and working using SQL Fiddle. Some minutes after, the OP added the tag MS-Access so my answer was no longer valid. I was at lunch, came back and saw the retag and a downvote. I asked in a comment to my answer about the downvote and noticed a weird situation on the question comments as another comment, done before the OP comment appeared as done after.

The downvoting user commented that my answer was not correct, that maybe initially it was correct as OP was not specifying wich RDBMS, but after his specification my answer was incorrect and downvoted. Another user just added a comment that OP was using MS-Access.

I corrected my answer to add correct code for MS-Access but left my previous code for SQL Server as I believe that if the code is right, other users can use it. I also commented about it. The downvoting user says: that he only will delete the downvote if I remove the SQL Server answer. If you wish to post an answer that does what the user asked, I will certainly remove the downvote. I am not sure why you still show SQL server code.

So, my question is: should I leave old code for other users to use it in case they find it useful, or should I erase it? In case I erase it, if another OP asks the same question, but tagging for SQL Server, then will it be a duplicate?

  • I did not say I would remove the downvote if you removed the sql answer, I said I would remove the down vote if you provided a correct MS Access answer. Note that I also downvoted another person who did not provide a correct answer. To quote, I said: "... If you wish to post an answer that does what the user asked, I will certainly remove the downvote. I am not sure why you still show SQL server code." – Remou Sep 21 '12 at 12:56
  • Thanks for the edit, my english is somewhat rusty – Yaroslav Sep 21 '12 at 13:01
  • Please correct your question and remove your misquotation. – Remou Sep 21 '12 at 13:27
  • I don't see what needs to be corrected or removed. Also, I see that you have +2k points on the MS-Access tag. Just suggesting. Why instead of just commenting you don't provide a full correct answer, other than use VBA? No harm, just asking my self that if you have answered so many question and you have been so active on this one, why not giving a good explanatory answer. Either using MS-Access of VBA, but more detailed. – Yaroslav Sep 21 '12 at 13:46
  • Your question above includes "The downvoting user says that he only will delete the downvote if I remove the SQL Server answer." I did not say that. Please point out where I said that or correct the above. – Remou Sep 21 '12 at 13:48
  • 1
    @Yaroslav In cases such as this ... where the rdbms was not specified at the outset (a point addressed by your first comment on that question) ... it might be better to defer your answer until the OP responds. If you had waited, would a SQL Server answer for an MS Access question seem appropriate? – HansUp Sep 21 '12 at 16:46
  • No, my first answer would not be appropiate but I could quickly modify it as I have more knowledge of it and have plenty of versions to where to test, other than SQL Fiddle. And yes, I could wait more but you know the old Fastest Gun in the West Problem – Yaroslav Sep 21 '12 at 16:54
  • @Yaroslav Does that mean you can't afford to wait because of the risk someone else will submit an answer similar enough to the one you had in mind that you would be deprived of an opportunity for points? I'm not trying to put words in your mouth, so please correct my interpretation if it's wrong. – HansUp Sep 21 '12 at 17:15
  • Yes, not correct, as soon as commented thought that could be not understood. Take a look into my answers and check how many are the first to a particular question. I comment the questions if I do not see tag refering to RDBMS or working code or table structures. I also take time to edit the questions before answering, so question are clearer, for everyone. I take my time to answer, I could answer (as many others) quicker, maybe not 100% accurately, but prefer not to do that. On this particular question I also was not the first to answer (correct me if I'm wrong, now I only see "6h ago"). – Yaroslav Sep 21 '12 at 17:45
  • from previous comment... On the post FGITW there are many different opinions, many comments and agreements or disagreements. One of them is the common acceptance of answering a short correct answer and then in the next minutes, construct a better answer, adding necessary explanations, links or code. That was my case. But unfortanetely on this question, I did not correctly interpreted the "update column" need, so my answer was not 100% accurate and on top of that the OP edited to add a RDBMS that I don't know very well and can not test my answer. Sorry for any error, my english is not top notch – Yaroslav Sep 21 '12 at 17:54
  • 1
    Yes, IMO, the only shortcoming of the final version of your Access answer was that it didn't do what the OP asked. I guess I see that as sufficient justification for a downvote, although I didn't vote at all. Ultimately, you deleted that answer, and I think that's also a reasonable decision. Perhaps the only disagreement of any consequence between me and you may be the value of the SQL Server part as an answer to an MS Access question. (I think) your position is it will be useful to someone with a similar SQL Server question who happens upon that MS Access question. That is not ... – HansUp Sep 21 '12 at 18:13
  • 1
    ... a persuasive argument IMO. Post SQL Server answers only to SQL Server questions. This opinion is based on my experience explaining Count(DISTINCT some_field) does not work in Access. Same for CASE ... WHEN. And ISNULL(arg1, arg2). And on and on. It gets tedious. :-( – HansUp Sep 21 '12 at 18:19
  • Correct, on your (I think) your position is it will be useful to someone with a similar SQL Server question who happens upon that MS Access question check my last phrase on this same question In case I erase it, if another OP asks the same question, but tagging for SQL Server, then will it be a duplicate?. None of the answers have addressed this issue. But answering my self, and reading your last comment, not, it will not be marked as duplicated. – Yaroslav Sep 21 '12 at 18:21
  • 1
    If it's similar, even same, question but different rdbms ... it's not a duplicate IMO. I'm not sure my opinion reflects community policy, though. I figure if I go astray, someone will tell me and I can delete my answer. I will stop here now because I got the system scolding about chatting in comments. That you for this thoughtful discussion. Regards, Hans. – HansUp Sep 21 '12 at 18:29
  • You are welcome, same to you. To be my first question on Meta I'm perfectly satisfied with it... and no upvotes? sad... XD – Yaroslav Sep 21 '12 at 18:39

There's no point leaving the old code... it's wrong.

I was going to say the commenter is being a little bit pathetic about removing the downvote and this is the impression given in your question. But I've looked at your answer; it is by no means clear that the second "answer" is incorrect. I feel a need to add that your answer isn't that great anyway. It's basically code and nothing else. No explanation of what's happening or why; is there really a valid reason you have for wanting to keep it? The question isn't that wonderful either.

If you really feel some moral obligation to keep the old code them maybe you should consider doing something like the below (I don't see the point on a question like this).

<Current answer>

... stuff

Original answer before addition of tags. This is now incorrect

<old answer>
| improve this answer | |
  • The second answer is incorrect. Please see my comment on the question above. How can it be "pathetic" to downvote an incorrect answer? – Remou Sep 21 '12 at 12:57
  • Thanks, something like this is what I needed. Edited my answer. PS: as you have checked my answer and commented here that is not great anyway could you, if possible, suggest a change? thanks either ways – Yaroslav Sep 21 '12 at 12:58
  • @Remou, that is not what I wrote. The OP made it seem as though they had made an extremely clear distinction and merely wanted to save some good work they'd done. In which case not removing the down-vote after the answer had been corrected isn't particularly charitable and seems designed to antagonise more than anything else. However, as I did write, this is clearly not what has happened in this situation. – ben is uǝq backwards Sep 21 '12 at 13:17
  • 2
    @Yaroslav it's just code; no explanation of what the code is doing or why. You need to explain yourself if you want to provide a good answer. You've also left in a SQL Fiddle linking to SQL Fiddle, which is incorrect. – ben is uǝq backwards Sep 21 '12 at 13:22
  • Okay, I was pretty upset at being misquoted in the question above. I most certainly would remove a downvote from a correct answer. – Remou Sep 21 '12 at 13:22
  • 1
    Ben re comment to @Yaroslav, no amount of explanation is going to make that query "Update Column", which is what the OP asked for. This is the main problem with the answer. – Remou Sep 21 '12 at 13:26

Leaving code for another DBMS is fine I believe, if you also provide code for the tagged one. Future viewers may have similar problem but use another DBMS so they may find the answer helpful.

In this situation though none of the edits provides an answer that actually answers the question correctly and UPDATEs the table, as asked in the question.

So, the answer is not correct, whatever the DBMS used. This is what I see in Remou's comments ("If you wish to post an answer that does what the user asked, I will certainly remove the downvote.")

| improve this answer | |
  • That was my initial question, about leaving or not the code, Ben answer seems more clear. I knew my answer was incorrect, I added some text clarifiyng that and eventually deleted it. – Yaroslav Sep 21 '12 at 14:24
  • My view is that if the code was incorrect (as I think this was), delete it or improve it (even if only for SQL-Server) or improve it and add code for Access. If the code is correct (for SQL-Server) leave it with a notice. – ypercubeᵀᴹ Sep 21 '12 at 14:31

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .