October 15, 2015 at 8:40 am
Thanks.
To be sure, wouldn't this work as well? (PARTITION BY namn ORDER BY Säsong) since namn (the name) doesn't change, but tröjnummer (which is the number on their sweaters) might change?
October 15, 2015 at 8:59 am
fernando.arias (10/15/2015)
Thanks.To be sure, wouldn't this work as well? (PARTITION BY namn ORDER BY Säsong) since namn (the name) doesn't change, but tröjnummer (which is the number on their sweaters) might change?
Yes, as long as there are not (now and never will be) two or more people with the same name. It's always better to choose some sort of 'PersonId' when doing this stuff to avoid any chance of such a thing. I had no idea what tröjnummer was, but it looked like such an Id from the screen shot.
The absence of evidence is not evidence of absence.
Martin Rees
You can lead a horse to water, but a pencil must be lead.
Stan Laurel
October 15, 2015 at 9:02 am
Got it!
Thanks so much for all your help!
October 15, 2015 at 9:09 am
Though, would there be any solution for the problem you presented. If there are two persons with the same name one of the will be deleted. Can I avoid this somehow? I can't think of any value that would be specific to a certain player though.
October 15, 2015 at 9:52 am
fernando.arias (10/15/2015)
Though, would there be any solution for the problem you presented. If there are two persons with the same name one of the will be deleted. Can I avoid this somehow? I can't think of any value that would be specific to a certain player though.
In the example data you have earlier, what is the meaning if that [Tr] column? If that's some type of person identifier, then you need to rank on ( Tr ) rather than name. Or perhaps rank on ( Namn, Tr ). In either case, if there were a 2nd person with the name "Aaron Downey" but a different [Tr] code, then they would be ranked and de-duplicated separately.
ID TrNamn Säsong Lag date land
1 44 Aaron Downey 2008-2009 DET 1974-08-27 Shelburne
2 44 Aaron Downey 2001-2002 CHI 1974-08-27 Shelburne
3 44 Aaron Downey 2006-2007 MTL 1974-08-27 Shelburne
4 9 Adam Graves 1998-1999 NYR 1968-04-12 Tecumseh
5 18 Adam Hall 2001-2002 NSH 1980-08-14 Kalamazoo
"Do not seek to follow in the footsteps of the wise. Instead, seek what they sought." - Matsuo Basho
Viewing 5 posts - 16 through 19 (of 19 total)
You must be logged in to reply to this topic. Login to reply