I want to have a counter column in a temp table that resets to 0 when account number changes. It looks like IDENTITY gets me part of the way there, but won't reset when account numbers change.
Example:
Account Color Counter
123 Blue 1
123 Yellow 2
123 Orange 3
456 Red 1
789 Blue 1
789 Yellow 2
789 Purple 3
789 Green 4
I am using SQL 2005.
Thanks!
Cathy
Example:
Account Color Counter
123 Blue 1
123 Yellow 2
123 Orange 3
456 Red 1
789 Blue 1
789 Yellow 2
789 Purple 3
789 Green 4
I am using SQL 2005.
Thanks!
Cathy