日期:2014-05-17 浏览次数:20697 次
SELECT ESEQ ID, --** Emp_NO, Emp_Name, Sex, --** '' Cos, DEPT_NAME Depart_No, CLS.CODE_DESC Class_No, JN.CODE_DESC Job_No, ST.CODE_DESC SITUATION, case when RESIGNING_DATE is null then null when RESIGNING_DATE>to_date('1980/01/01', 'yyyy/mm/dd') and RESIGNING_DATE>to_date('2080/01/01', 'yyyy/mm/dd') then RESIGNING_DATE else null end as RESIGNING_DATE, RES.CODE_DESC RESIGNING_REASON, RET.CODE_DESC RESIGNING_TYPE, case when E.JOB_ST='JOB_ST004' then ST.CODE_DESC||'('||Replace(RET.CODE_DESC, '(2012年5月19號后不再使用)', '')||')' else ST.CODE_DESC end ST_SITUATION, DATA_Transfer_Date Transfer_Date, --** ID_NO Emp_ID, BU_NAME Career, --** HIRE_DATE InFactoryDate, POSITION_NAME, NATIVE, BIRTHDAY From chr_employee@chr E left join Code CLS@chr on CLS.CODE_ID=E.CLASS_CODE / [b][size=16px]這裡提示遺漏關鍵字,百思不得其解啊[/size][/b]left join Code JN@chr on JN.CODE_ID=E.Job_Code left join Code ST@chr on ST.CODE_ID=E.JOB_ST left join Code RES@chr on RES.CODE_ID=E.RESIGNING_REASON left join Code RET@chr on RET.CODE_ID=E.RESIGNING_TYPE left join Code BG@chr on BG.CODE_ID=E.BG_CODE left join Code F@chr on F.CODE_ID=E.FACTORY_CODE left join Code ED@chr on ED.CODE_ID=E. EDU_DEGREE