Hi all,
I have a table which has rows like below:
-----------------------------------
Documentnum TYPE TRANDATE
------------------------------------
907837 TFI 2004-02-25
907837 TFO 2004-02-23
907688 TFI 2004-02-24
907688 TFO 2004-02-20
-------------------------------------
Now, I want to select 907688 because the difference between the dates is more then 3 days in the last two rows. Is it possible to do, if you notice the only difference is the TYPE which is TFI in one and TFO in the last row, both have same documentnum.
How can I write the select statement to obtain the result.
Thank you,
Shal
I have a table which has rows like below:
-----------------------------------
Documentnum TYPE TRANDATE
------------------------------------
907837 TFI 2004-02-25
907837 TFO 2004-02-23
907688 TFI 2004-02-24
907688 TFO 2004-02-20
-------------------------------------
Now, I want to select 907688 because the difference between the dates is more then 3 days in the last two rows. Is it possible to do, if you notice the only difference is the TYPE which is TFI in one and TFO in the last row, both have same documentnum.
How can I write the select statement to obtain the result.
Thank you,
Shal