The sample data has been shown below:
Users with Registration ID 1, 2 and 3 had Zone data similar to the following:
So going by the pattern, a user with Registration ID 4 should have Zone data
However that was not the case, as seen in the sample data. There were a few other rows where data of a different registration id had been entered. The requirement however was not to link the data with the pattern, but to find duplicates of existing rows (zones) and mark them with a special character.
Here's how I identified the duplicate rows using CTE(Common Table Expression) and marked them with a '---'
Did you like this post?
|subscribe via rss||subscribe via e-mail|
|print this post||follow me on twitter|