markgargan
Programmer
Hi folks,
Say I have the following table
id | name
---------
1 Michael
2 James
3 John
4 James
5 Michael
6 James
Is there any select function I can perform that
could print out the values of the id, name column and a number representing the ith time this name appears
in the column? i.e. the result set would look like this.
id | name | ith
---------------
1 Michael 1
2 James 1
3 John 1
4 James 2
5 Michael 2
6 James 3
Sorry for the poor explanation I can't think of the proper term for this ith column? Version? Sequence number? Appearance count?
Thanks,
Mark.
Say I have the following table
id | name
---------
1 Michael
2 James
3 John
4 James
5 Michael
6 James
Is there any select function I can perform that
could print out the values of the id, name column and a number representing the ith time this name appears
in the column? i.e. the result set would look like this.
id | name | ith
---------------
1 Michael 1
2 James 1
3 John 1
4 James 2
5 Michael 2
6 James 3
Sorry for the poor explanation I can't think of the proper term for this ith column? Version? Sequence number? Appearance count?
Thanks,
Mark.