Hi, I have to build a query for a crystal report for some file tracking system. There are two tables table A & table B from where the information would be coming… Both tables have the same fields and structure. Fields required are file barcode, location & date of allocation. Now what happens, first time when a location is assigned to a file, file barcode, location & date of allocation are stored in table A (call it locationA, Date1). Suppose the file is moved to a new location B on Date2 then table A would now have locationB, Date1 and table B would have LocationA, Date2. Again if the file moves to location C on Date3, then table A would have locationC, Date1 and table B would have 2 records, LocationA, Date2 and LocationB and Date3. In orther words, table A would always have the latest file location with the first date of allocation(we call it the date of birth) and table B would have previous locations with the date of action i.e. the date on which the file was moved FROM this location.
Now, User wants to see the report based on date of allocation, i.e on Date1 he wants locationA, Date2 he wants locationB and so on. How can I build this query. Please help!!!
sarna (BOB member since 2012-09-15)