Mileage Correction

Created by Mehmet Simsek, Modified on Tue, 17 Nov at 3:47 PM by Mehmet Simsek

Workshops may request us to correct the mileage of a truck because the wrong mileage has been recorded previously.


This has to be done in the database.


We will use 182 D 30246 as an example.

This trucks mileage was recorded as 700,000 instead of it being 592,216


We go to AMWEST in the database (AMWEST is for Westward, AOC's DB is called amaoccom, I haven't done any other dealer) 

The three tables we will be looking at are:

  1.  vehi
  2. gsals02 (We are gsals02, every other dealer will be gsals01 apart from limerick which will be gsals02)
  3. sehi


select vehiid from vehi where serialno = '9247164'; - This is the vin number of the truck

Run this first and get vehiid


select * from gsal01 where vehiid = '43832'; 
select * from sehi where vehiid = '43832';


Once you get vehiid use it to runt the next 2 queries.


update gsals02
set distriv = '12526' 
where vehiid = '43832' and distdriv = '125266 ';


update sehi
set distdriv = '12526' 
where vehiid = '43832' and dpcustno '119402';


update vehi
set pdistdr = '21230' (This is todays mileage)
where vehiid = '43832' and serialno = '9379887 ';

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons

Feedback sent

We appreciate your effort and will try to fix the article