TRUNCATE TABLE FDM.fdm_jg_fydkjl; INSERT INTO FDM.fdm_jg_fydkjl ( gh, -- 工号 xm, -- 姓名 dwh, -- 单位号 dwmc, -- 单位名称 fbdkrwsj, -- 发布打卡任务时间 wcdksj, -- 完成打卡时间 dkdd, -- 打卡地点 sfqj, -- 是否请假 sfyxdk, -- 是否有效打卡 xb, -- 性别 lxdh, -- 联系电话 hsqksm, -- 核算情况说明 sfzjh, -- 身份证件号 jzdz -- 居住地址 ) SELECT t2.gh, --工号 t11.xm, --姓名 t11.dwh, -- 单位号 t11.dwmc, -- 单位名称 CAST(NULL AS TIMESTAMP) AS fbdkrwsj, -- 发布打卡任务时间 t2.dksj AS wcdksj, -- 完成打卡时间 NULL AS dkdd, -- 打卡地点 NULL AS sfqj, -- 是否请假 '1' AS sfyxdk, -- 是否有效打卡 CAST(t4.xb AS VARCHAR), --性别 CAST(t7.lxdh AS VARCHAR), -- 联系电话 CAST(t8.hsqksm AS VARCHAR) AS hsqksm, -- 核算情况说明 CAST(t9.sfz AS VARCHAR) AS sfzjh, --身份证件号 CAST(t10.jzdz AS VARCHAR) AS jzdz --居住地址 FROM ( SELECT DISTINCT(t1.user_id) AS gh, t1.answer AS bjmc, t1.answer_time AS dksj FROM ODS.ODS_YDXY_LYYD3_B_GRADUATE_ANSWER t1 WHERE t1.type = 'bjmc' )t2 LEFT JOIN ( SELECT DISTINCT(t1.user_id) AS gh, t1.answer AS xm, t1.answer_time AS dksj FROM ODS.ODS_YDXY_LYYD3_B_GRADUATE_ANSWER t1 WHERE t1.type = 'username' ) t3 ON t2.gh = t3.gh AND t2.dksj = t3.dksj LEFT JOIN ( SELECT DISTINCT(t1.user_id) AS gh, t1.answer AS xb, t1.answer_time AS dksj FROM ODS.ODS_YDXY_LYYD3_B_GRADUATE_ANSWER t1 WHERE t1.type = 'xb' ) t4 ON t2.gh = t4.gh AND t2.dksj = t4.dksj LEFT JOIN ( SELECT DISTINCT(t1.user_id) AS gh, t1.answer AS bjmc, t1.answer_time AS dksj FROM ODS.ODS_YDXY_LYYD3_B_GRADUATE_ANSWER t1 WHERE t1.type = 'bjmc' ) t5 ON t2.gh = t5.gh AND t2.dksj = t5.dksj LEFT JOIN ( SELECT DISTINCT(t1.user_id) AS gh, t1.answer AS bmmc, t1.answer_time AS dksj FROM ODS.ODS_YDXY_LYYD3_B_GRADUATE_ANSWER t1 WHERE t1.type = 'bmmc' ) t6 ON t2.gh = t6.gh AND t2.dksj = t6.dksj LEFT JOIN ( SELECT DISTINCT(t1.user_id) AS gh, CAST(t1.answer AS VARCHAR) AS lxdh, t1.answer_time AS dksj FROM ODS.ODS_YDXY_LYYD3_B_GRADUATE_ANSWER t1 WHERE t1.type = 'bdsjh' ) t7 ON t2.gh = t7.gh AND t2.dksj = t7.dksj LEFT JOIN ( SELECT DISTINCT(t1.user_id) AS gh, t1.answer AS hsqksm, t1.answer_time AS dksj FROM ODS.ODS_YDXY_LYYD3_B_GRADUATE_ANSWER t1 WHERE t1.type = 'radio' ) t8 ON t2.gh = t8.gh AND t2.dksj = t8.dksj LEFT JOIN ( SELECT DISTINCT(t1.user_id) AS gh, t1.answer AS sfz, t1.answer_time AS dksj FROM ODS.ODS_YDXY_LYYD3_B_GRADUATE_ANSWER t1 WHERE t1.type = 'sfz' ) t9 ON t2.gh = t9.gh AND t2.dksj = t9.dksj LEFT JOIN ( SELECT t1.user_id AS gh, t1.answer AS jzdz, t1.answer_time AS dksj FROM ODS.ODS_YDXY_LYYD3_B_GRADUATE_ANSWER t1 WHERE t1.type = 'address' ) t10 ON t2.gh = t10.gh AND t2.dksj = t10.dksj LEFT JOIN FDM.fdm_jg_jbxx t11 ON t2.gh = t11.gh WHERE t2.gh = t11.gh
时间: 2023-03-11 22:06:39 浏览: 144
Oracle_审计表_sys.aud$_授权给用户Truncate权限.docx
很抱歉,我不太明白您的问题。我只能告诉您,FDM.fdm_jg_fydkjl是一个用于存储用户工号、姓名、单位号、单位名称、发布打卡任务时间、完成打卡时间、打卡地点、是否请假、是否有效打卡、性别、联系电话、核算情况说明、身份证件号和居住地址等信息的表。
阅读全文