This is related to the query that I had posted earlier.
The table is like:
--------------------------------------
TYPE DOCUMENTNUM TRANDATE
----------------------------------------
TFO 06305 2004-03-01
TFI 07231 2004-02-12
TFO 07231 2004-02-10
TFI 07348 2004-02-22
TFO 07348 2004-02-20
------------------------------------
Now I want to select just the first row because it doesn't have the TFI row for the same DOCUMENTNUM and also differece between the TRANDATE for that and today's date(Getdate()) is more than 3.Don't want to display it if the date difference is less than 3.
Thank you,
Shal
The table is like:
--------------------------------------
TYPE DOCUMENTNUM TRANDATE
----------------------------------------
TFO 06305 2004-03-01
TFI 07231 2004-02-12
TFO 07231 2004-02-10
TFI 07348 2004-02-22
TFO 07348 2004-02-20
------------------------------------
Now I want to select just the first row because it doesn't have the TFI row for the same DOCUMENTNUM and also differece between the TRANDATE for that and today's date(Getdate()) is more than 3.Don't want to display it if the date difference is less than 3.
Thank you,
Shal