Archives of the TeradataForum
Message Posted: Wed, 25 May 2011 @ 08:43:01 GMT
Subj: | | OLAP function and tracking data changes |
|
From: | | Alan.Chow |
Hi,
Assuming I am given the following data:
field1 field2 field3 field4 start_date end_date
------ ------ ------ ------ ---------- --------
1001 AAA value3 01/01/2011 10/01/2011
1001 AAA value3 555 11/01/2011 22/01/2011
1001 AAA value3 11 23/01/2011 10/03/2011
1001 BBB value3 11 11/03/2011 08/05/2011
1001 AAA value3 11 09/05/2011 31/12/2999
I am interested in tracking the changes in the first 3 fields only, so I need to select from the table hoping to get a result as
below:
field1 field2 field3 start_date end_date
------ ------ ------ ---------- --------
1001 AAA value3 01/01/2011 10/03/2011
1001 BBB value3 11/03/2011 08/05/2011
1001 AAA value3 09/05/2011 31/12/2999
but have not been successful. Would anyone know how ? Much appreciated.
|