Hi all, i am trying to create a database query to compare dates. What i have is i find duplicates of serial numbers now i need to find out if the PGI Date and the Close out date are within 3 months of each other.
ID Serial No# PGI Date Close Out
590 04034-06-034 17/05/2012 22/05/2012
27 04034-06-034 28/12/2011 29/12/2011
ID Serial No# PGI Date Close Out
352 3160023 21/03/2012 11/04/2012
634 3160023 28/05/2012
So in the first one it has found that there is a duplicate of the serial number but the Close Out date of ID 27 is not with in 3 months of the PGI Date of 590. Where as on the second example ID 352 the Close out date is within 3 months of ID 634 PGI Date.
If anyone knows of a way to do this it would be greatly appreciated or if you would like further details just let me know.
Thanks in advance.
ID Serial No# PGI Date Close Out
590 04034-06-034 17/05/2012 22/05/2012
27 04034-06-034 28/12/2011 29/12/2011
ID Serial No# PGI Date Close Out
352 3160023 21/03/2012 11/04/2012
634 3160023 28/05/2012
So in the first one it has found that there is a duplicate of the serial number but the Close Out date of ID 27 is not with in 3 months of the PGI Date of 590. Where as on the second example ID 352 the Close out date is within 3 months of ID 634 PGI Date.
If anyone knows of a way to do this it would be greatly appreciated or if you would like further details just let me know.
Thanks in advance.