Your SQL will work.

Did you check (rpo_key, vehicle_key) uniqueness in the temp table?

Tamil