I have table as below and would like to create a column that displays the distinct count of all the date columns and reset on change of Customer and Product
Desired Result Set
In the above result set, I have added Ctr1 to get a distinct count of Date1 and Ctr2 for Date2.
Appreciate any assistance.
XIR2 on Unix Solaris
Informatica 7.1.3
CRXIR2, Oracle 9i/10g
Code:
Customer Product Date1 Date2
--------+-------+----------+----------+
ABC 123 01/01/08 02/15/08
ABC 123 02/01/08 02/17/08
ABC 123 01/01/08 02/18/08
ABC 123 01/31/08 02/15/08
ABC 456 02/01/08 03/07/08
ABC 456 02/10/08 03/09/08
ABC 456 02/05/08 03/07/08
ABC 456 02/01/08 03/10/08
Desired Result Set
Code:
Customer Product Date1 Ctr1 Date2 Ctr2
--------+-------+----------+----+---------+-------+
ABC 123 01/01/08 1 02/15/08 1
ABC 123 02/01/08 2 02/17/08 2
ABC 123 01/01/08 1 02/18/08 3
ABC 123 01/31/08 3 02/15/08 1
ABC 456 02/01/08 1 03/07/08 1
ABC 456 02/10/08 2 03/09/08 2
ABC 456 02/05/08 3 03/07/08 1
ABC 456 02/01/08 1 03/10/08 3
In the above result set, I have added Ctr1 to get a distinct count of Date1 and Ctr2 for Date2.
Appreciate any assistance.
XIR2 on Unix Solaris
Informatica 7.1.3
CRXIR2, Oracle 9i/10g