Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
amits
Starting Member
6 Posts |
Posted - 2010-10-05 : 01:37:34
|
I have a set of data having account numbers and customer name.There are instances where the data is duplicated. I want to append a new reference number for all records so that duplicate accoounts have the same reference number. For example account X001 belongs to Mr Smith and it appears twice. For both records I want to have a unique reference number 1. |
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2010-10-05 : 06:50:47
|
Use dense_rank() functionMadhivananFailing to plan is Planning to fail |
 |
|
amits
Starting Member
6 Posts |
Posted - 2010-10-05 : 21:40:09
|
Thanks Madhivanan...it worked |
 |
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2010-10-06 : 04:42:24
|
quote: Originally posted by amits Thanks Madhivanan...it worked
You are welcome MadhivananFailing to plan is Planning to fail |
 |
|
|
|
|