Sql structure update and correct value for waypoint insert