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 |
|
tsiegle
Starting Member
9 Posts |
Posted - 2003-03-27 : 23:37:47
|
| Can anyone refresh my memory with an easy way to create a unique sequence based on the grouping of a column. I have done it before and know there is a simple way, I just can't figure it out!For example, my table contains GrantID and SEQ as Primary key columns, then CaseID and LawID. There may be multiple GrantIDs of 15, because they have different LawID. i.e.SEQ GrantID LawID 1 15 502 15 521 16 50So, I just want to be able to auto create that SEQ column, based on a group By GrantID. If there are 3 LawID's then the records would be 1, 2, 3...if not SEQ would just be one.Please please help!Thank you!TracyThanks! Tracy Siegle |
|
|
simondeutsch
Aged Yak Warrior
547 Posts |
|
|
|
|
|