Hello
I have a dbf file that has some record entries with the same invoice number. Each set of records with the same invoice has a sequence # field and date when it took effect. I need to write some code (or maybe a slick filter for my query) that will return just the 1 most current record (using the date field) from those records with the same invoice number.
I'm at a loss where to start. I'm not sure if this is possible from within a query or if I should code a procedure that will work its way through the table and create a new table or strip out the information I don't need. It looks like some invoices have up to 7 duplicates.
GENERALLY the last sequence # is typically the most up to date, but I have already found cases where this isn't the case...either due to blank fields or error in input. I'd rather drive this based on the date to be certain.
Thanks for any help and ideas
I have a dbf file that has some record entries with the same invoice number. Each set of records with the same invoice has a sequence # field and date when it took effect. I need to write some code (or maybe a slick filter for my query) that will return just the 1 most current record (using the date field) from those records with the same invoice number.
I'm at a loss where to start. I'm not sure if this is possible from within a query or if I should code a procedure that will work its way through the table and create a new table or strip out the information I don't need. It looks like some invoices have up to 7 duplicates.
GENERALLY the last sequence # is typically the most up to date, but I have already found cases where this isn't the case...either due to blank fields or error in input. I'd rather drive this based on the date to be certain.
Thanks for any help and ideas