UPDATE customer_ledgers
INNER JOIN glan.dealers as dl
	ON customer_ledgers.customer_id = dl.dealer_code
SET customer_ledgers.customer_id = dl.id