data extraction problem.
-
Hi, Currently i'm developing a system that store inventory record. In my system, i have a database named "rnz.mdb" and it has a table named "recordsList". The PK for the table is FormSerialNumber. The FormSerialNumber is like this --> 68001-001-001. The 1st 5 digit shows the form code.(68001 is the code for inventory form). The 3 digit in the middle is the item ID and the last 3 digits is the number of changes that have been made to the item(for example, computer upgrading). In the field also, there is a field named "Date". My problem is, my boss want the system to display the latest record for each item and at the same time keep the previous record of each of the item. The previous record will became the record's history. I can do the record history part. My problem is the latest record. How can I extract the latest record for each item from the list of records:confused:.
-
Hi, Currently i'm developing a system that store inventory record. In my system, i have a database named "rnz.mdb" and it has a table named "recordsList". The PK for the table is FormSerialNumber. The FormSerialNumber is like this --> 68001-001-001. The 1st 5 digit shows the form code.(68001 is the code for inventory form). The 3 digit in the middle is the item ID and the last 3 digits is the number of changes that have been made to the item(for example, computer upgrading). In the field also, there is a field named "Date". My problem is, my boss want the system to display the latest record for each item and at the same time keep the previous record of each of the item. The previous record will became the record's history. I can do the record history part. My problem is the latest record. How can I extract the latest record for each item from the list of records:confused:.
-
Try this: Select * from sometable a where a.FormSerialNumber = (Select max(b.FormSerialNumber) from sometable b where a.identifier = b.identifier This way you select the latest record Hope this is the answer to your "VB" guestion Grtz, Guus
thanx...i'll try it