R
robertadamharper
Adding Sequence number based on Date
I am trying to update a "table" by adding a sequence number that
increments by 1 but resets upon a change in "Contact_URN" and is based
on a time period("PERIOD"). Below is some
data:
PERIOD Contact_URN Sales Doc Sum of Value
200612 2 1 11
200704 2 1 15
200212 2 1
75
200506 8 1
8468
200501 15 1 15
200601 15 1
12
Below is what I want to get to;-
PERIOD Contact_URN Sales Doc Sum of Value
Seq No
200612 2 1
11 2
200704 2 1
15 3
200212 2 1
75 1
200506 8 1
8468 1
200501 15 1
15 1
200601 15 1
12 2
Please can anyone help.
Rob
I am trying to update a "table" by adding a sequence number that
increments by 1 but resets upon a change in "Contact_URN" and is based
on a time period("PERIOD"). Below is some
data:
PERIOD Contact_URN Sales Doc Sum of Value
200612 2 1 11
200704 2 1 15
200212 2 1
75
200506 8 1
8468
200501 15 1 15
200601 15 1
12
Below is what I want to get to;-
PERIOD Contact_URN Sales Doc Sum of Value
Seq No
200612 2 1
11 2
200704 2 1
15 3
200212 2 1
75 1
200506 8 1
8468 1
200501 15 1
15 1
200601 15 1
12 2
Please can anyone help.
Rob