Find the second day transaction amount for a Accnt_id.
Ex: Epected records are marked in red.
Acct_Hist
Accnt_id, Trans_Dt, Seq_Num
1001 23-10-09 1
1001 24-10-09 1
1001 25-10-09 1
1002 26-10-09 1
1002 27-10-09 1
1002 27-10-09 2
1002 28-10-09 1
Output:
Accnt_id, Trans_Dt ,Seq_Num
1001 24-10-09 1
1002 27-10-09 1
1002 27-10-09 2
second day transaction date of customer
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 14
- Joined: Wed Nov 11, 2009 4:52 am
- Location: New York
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Welcome aboard.
If your data are sorted, then this is a straightforward application of using stage variables to compare the current row with the previous row.
However, the logic in your example does not appear to match your words.
If your data are sorted, then this is a straightforward application of using stage variables to compare the current row with the previous row.
However, the logic in your example does not appear to match your words.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
-
- Participant
- Posts: 3337
- Joined: Mon Jan 17, 2005 4:49 am
- Location: United Kingdom