Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 7140 days old. Please don't post here. Open a new topic instead.

Recommended Posts

  • Newbies
Posted

I tend to apply this script in an inventory db I'm working on but for discussion sake, say I have a db of 5 automobiles, all accords but different cars, unique Licence.

1. Honda, Accord, Licence, Date,Odometer,Fuel purchased

2. Honda, Accord, Licence, Date,Odometer,Fuel purchased

3. Honda, Accord, Licence, Date,Odometer,Fuel purchased

4. Honda, Accord, Licence, Date,Odometer,Fuel purchased

5. Honda, Accord, Licence, Date,Odometer,Fuel purchased

The original record for each car was created when the car was purchased and

a new record is created every time gas is put in the car.

So now the bd contains, say 200 records. I am trying to come up with a script that will pull out the most recent occurrence (Date) for each car and display this in a Table. This new Table should only contain 5 records.

Thanks for any suggestions on how to go about this, I'm stumped!

Ron

Posted

All i can think of right now...

Is that you would need a script to sort your table by most recent date

then loop to find the CAR #1; put that data in a temp table (add new record)

continue your loop searching for CAR #2 etc...

At the end display the temp table and you will have your 5 cars.

Finally delete all temp records in your temp table to be ready for

the next time.

Another way would be a related table based on plate# that stores all fuel

purchases, that way you could show (in a portal) all fuel transactions for

a given car.

HTH

Dan

This topic is 7140 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.