I have the below column in a table which has same string values. I need to replace the strings which are equal for eg:
+----+-------------+
| ID | Column_Name |
+----+-------------+
| 1 | Imports |
| 2 | Imports |
| 3 | Exports |
| 4 | Exports |
+----+-------------+
Which needs to be replaced as :
+----+-------------+
| ID | Column_Name |
+----+-------------+
| 1 | Imports1 |
| 2 | Imports2 |
| 3 | Exports1 |
| 4 | Exports2 |
+----+-------------+
Is there a way to achieve this in SQL query ?
The purpose of doing this is that I'm using the 'Column_Name' string values in the dynamic SQL to replace the Integer values because of the same names the different values for the column are not getting replaced.