hello
I have a tabele with 3 colums. I need to increment the value of the row with 1 eachtime the partner changes (see column row2)
number partner row row2
1 A100 5 5
2 A100 5 6
3 A100 5 7
4 A200 28 28
5 A200 28 29
6 A300 12 12
7 A300 12 13
8 A300 12 14
9 A300 12 15
I tried: SELECT cardcode, linenum, ROW_NUMBER() OVER(PARTITION BY cardcode ORDER BY cardcode DESC) AS "Row Number" from TEST02
But then tow2 start each time by 1
Someone an idea?
I've tried
regards
Dan
Dan
I have a tabele with 3 colums. I need to increment the value of the row with 1 eachtime the partner changes (see column row2)
number partner row row2
1 A100 5 5
2 A100 5 6
3 A100 5 7
4 A200 28 28
5 A200 28 29
6 A300 12 12
7 A300 12 13
8 A300 12 14
9 A300 12 15
I tried: SELECT cardcode, linenum, ROW_NUMBER() OVER(PARTITION BY cardcode ORDER BY cardcode DESC) AS "Row Number" from TEST02
But then tow2 start each time by 1
Someone an idea?
I've tried
regards
Dan
Dan