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?