Quantcast
Viewing all articles
Browse latest Browse all 4871

sql query - duplicate values

I have a number of duplicate values and I need to append a 0 to the front of them so if I have the following values:

1234

1234

1234

1234

the corrected values should be

1234

01234

001234

0001234

How can I do this using sql?

I'm using the following statement to check for duplicates

SQL
SELECT<COL1,ROW_NUMBER()OVER(PARTITIONBY<COL1ORDERBY<COL1)ASRowNoFROM<tableA

Viewing all articles
Browse latest Browse all 4871

Trending Articles