G
Guest
Appreciate if you can help me figure out a way to resolve this query.
I'm trying to query for customer maintenance records based on the criteria
below but I'm not sure how I can go about doing so:
BEGIN checking from the last record:
IF the "Support Flag Field" = "NO" AND "Start Date field" <= Now() - 60days
THEN shows only the the previous record before the last record
ELSE shows the last record
No. Support Flag Start Date Customer
1 Yes 28/02/2002 A
2 Yes 28/02/2003 A
3 Yes 28/02/2004 A
4 No 28/02/2005 A
5 Yes 28/02/2002 B
6 Yes 28/02/2003 B
7 Yes 28/02/2004 B
8 Yes 28/02/2005 B
Base on above table, for customer "A", the query should pick record number 3.
For customer "B", the query should pick record number 8.
I hope the explanation above is informative. Thanks in advance
I'm trying to query for customer maintenance records based on the criteria
below but I'm not sure how I can go about doing so:
BEGIN checking from the last record:
IF the "Support Flag Field" = "NO" AND "Start Date field" <= Now() - 60days
THEN shows only the the previous record before the last record
ELSE shows the last record
No. Support Flag Start Date Customer
1 Yes 28/02/2002 A
2 Yes 28/02/2003 A
3 Yes 28/02/2004 A
4 No 28/02/2005 A
5 Yes 28/02/2002 B
6 Yes 28/02/2003 B
7 Yes 28/02/2004 B
8 Yes 28/02/2005 B
Base on above table, for customer "A", the query should pick record number 3.
For customer "B", the query should pick record number 8.
I hope the explanation above is informative. Thanks in advance