Quantcast
Channel: dBforums – Everything on Databases, Design, Developers and Administrators
Viewing all articles
Browse latest Browse all 13329

How to number records, duplicates receiving same number

$
0
0
I have a large table of customers. I would like to add a column that contains an integer, unique to that customer. The trick is that this file contains many duplicate customers, so I want the duplicates to all have the same number between them.

Tim
Phil
Tim
Tim
John
Tammy
Jill
Tammy

would turn into;

Tim 1
Phil 2
Tim 1
Tim 1
John 3
Tammy 4
Jill 5
Tammy 4

Any ideas? the numbers dont have to be sequential or anything, just like customers having the same one.

Viewing all articles
Browse latest Browse all 13329

Trending Articles