G
Guest
I have a database with a main table (parent) and sub-table (child) that
contain records of books checked in and out by date. The main table only has
the book ID, book name and some other basic fields. The sub-table contains
all of the transactions the book has seen (date checked out, library member,
date checked in) where the book ID is tied back to the main table. I need to
create a query that looks through all of the book's history and only returns
a single hit for each book checked in and then only the latest transaction.
Here's an example:
Book ID Date Out Member Date In
H34 12/1/00 J. Smith 3/5/01
H34 6/15/02 D.Jones 11/18/02
H34 3/15/03 R. Brown 9/28/03
I would want the query to only return the last transaction which had the
book being checked back in on 9/28/03. I want to use this query to determine
what books have been checked back in the longest and want to be featured to
the members. How can this be done? Any help, thoughts or ideas would be
greatly appreciated.
Roger
contain records of books checked in and out by date. The main table only has
the book ID, book name and some other basic fields. The sub-table contains
all of the transactions the book has seen (date checked out, library member,
date checked in) where the book ID is tied back to the main table. I need to
create a query that looks through all of the book's history and only returns
a single hit for each book checked in and then only the latest transaction.
Here's an example:
Book ID Date Out Member Date In
H34 12/1/00 J. Smith 3/5/01
H34 6/15/02 D.Jones 11/18/02
H34 3/15/03 R. Brown 9/28/03
I would want the query to only return the last transaction which had the
book being checked back in on 9/28/03. I want to use this query to determine
what books have been checked back in the longest and want to be featured to
the members. How can this be done? Any help, thoughts or ideas would be
greatly appreciated.
Roger