
-- 清空查勘员轨迹表
TRUNCATE TABLE dd_surveyor_trace;

-- 迁移数据
INSERT INTO `dd_surveyor_trace` (
	`surveyor_code`,
	`longitude`,
	`latitude`,
	`position`,
	`create_by`,
	`create_time`
) SELECT
	USER_CODE,
	LONGITUDE,
	LATITUDE,
	LOCATION,
	CREATE_BY,
	CREATE_TIME
FROM
	sd_survey_position;



-- ------------------------------额外处理字段------------------------------

-- -----查勘员表相关字段
UPDATE dd_surveyor_trace t,dd_surveyor s
SET t.surveyor_name = s.surveyor_name,
t.org_code = s.org_code,
t.org_name = s.org_name
WHERE t.surveyor_code = s.surveyor_code;












