Hi
I have beaten my head to resolve this duplicate problem that appeared to be more complicated than I asked before.
I used the query below and it does eleiminate earlier DATE OF QUESTION record (which is my purpose) but unfortunately in case there are 3 records with 2 of them equal with DATE OF QUESTION and two records have EQUAL DATE OF QUESTION are older than the 3rd one…then sometimes this query choses to leave the record with Date OF ACTION which is null (while I need otherwise)
member id DATE of Question Date of Action
11 10/30/2003
11 10/14/2003
11 10/30/2003 11/31/2003
22 9/11/2004
22 8/2/2004
22 9/11/2004 9/11/2004
33 7/1/2004
33 7/1/2004 7/1/2004
44 5/1/2003
44 5/1/2003 5/1/2003
44 5/1/2003 5/1/2003
I need the following output:
member id DATE of Question Date of Action
11 10/30/2003 11/31/2003
22 9/11/2004 9/11/2004
33 7/1/2004 7/1/2004
44 5/1/2003 5/1/2003
Initial query was the following:
DELETE makepart1.[MEMBER ID], makepart1.[DATE OF QUESTION]
FROM makepart1
WHERE (((MAKEPART1.[Date of Question])<(select max( [Date of Question] ) from MAKEPART2 where Makepart2.[MEMBER ID]=MAKEPART1.[MEMBER ID])));
Is there any easy way to adjust the query above in order it eliminate recent DATE OF QUESTION and if we have 2 of them equal then the subject for taking away is the one which DATE OF ACTION IS NUL (if any)? Otherwise any record taken away is good…
I am exhausted with this query?
Thank you very much for your help and consideration…
I have beaten my head to resolve this duplicate problem that appeared to be more complicated than I asked before.
I used the query below and it does eleiminate earlier DATE OF QUESTION record (which is my purpose) but unfortunately in case there are 3 records with 2 of them equal with DATE OF QUESTION and two records have EQUAL DATE OF QUESTION are older than the 3rd one…then sometimes this query choses to leave the record with Date OF ACTION which is null (while I need otherwise)
member id DATE of Question Date of Action
11 10/30/2003
11 10/14/2003
11 10/30/2003 11/31/2003
22 9/11/2004
22 8/2/2004
22 9/11/2004 9/11/2004
33 7/1/2004
33 7/1/2004 7/1/2004
44 5/1/2003
44 5/1/2003 5/1/2003
44 5/1/2003 5/1/2003
I need the following output:
member id DATE of Question Date of Action
11 10/30/2003 11/31/2003
22 9/11/2004 9/11/2004
33 7/1/2004 7/1/2004
44 5/1/2003 5/1/2003
Initial query was the following:
DELETE makepart1.[MEMBER ID], makepart1.[DATE OF QUESTION]
FROM makepart1
WHERE (((MAKEPART1.[Date of Question])<(select max( [Date of Question] ) from MAKEPART2 where Makepart2.[MEMBER ID]=MAKEPART1.[MEMBER ID])));
Is there any easy way to adjust the query above in order it eliminate recent DATE OF QUESTION and if we have 2 of them equal then the subject for taking away is the one which DATE OF ACTION IS NUL (if any)? Otherwise any record taken away is good…
I am exhausted with this query?
Thank you very much for your help and consideration…