Update Column in Master Table After Update in Child Table

Hi all.

I’m looking for the best way of achieving this. I have a small fleet database with a master table of vehicles and 2 child/related tables - Vehicle Check Records and Vehicle Service Records

On the master table for each vehicle I have a column for current mileage, current driver and status (Checked in at Garage A, Checked In at Garage B, Checked Out from Garage A, Checked Out from Garage B, Service etc.)

When a vehicle is checked out or in the current driver, mileage and status is known.
When a vehicle is in for service the current mileage is known and by default the status is Service

So each time a Vehicle Check Record or Vehicle Service Record is created or amended, I’d like to automatically update the relevant columns in the master Vehicle table.

Any help on the best way to achieve this gratefully received.

Cheers
David

0 11 676
11 REPLIES 11
Top Labels in this Space