我需要帮助来获取此插入语句中包含的作业代码 DESCR。
我不断收到此错误SQL Status = 1400, SQL Error = ORA-01400: cannot insert NULL into ("SYSADM"."PS_J_ACTION_COUNTS"."JOBCODE_DESCR")
begin-SELECT Loops=1
E.BUSINESS_UNIT
E.JOBCODE
EA.DESCR
E.EFFDT
E.EFFSEQ
do Insert-XferOut
FROM PS_JOB E,
PS_JOBCODE_TBL EA,
PS_PERSON PP3
WHERE E.EMPLID = &B.EmplID
AND E.EMPLID = PP3.EMPLID
AND E.JOBCODE = EA.JOBCODE
AND E.PER_ORG = 'EMP'
AND E.EMPL_RCD = &B.EMPL_RCD
AND (E.EFFDT < &B.EffDt OR E.EFFDT = &B.EffDt AND E.EFFSEQ < &B.EffSeq)
ORDER BY E.EFFDT DESC, E.EFFSEQ DESC
end-SELECT
end-procedure
begin-procedure Insert-XferOut
let $sql-statement = 'MP2_JOB.SQR,Insert-XferOut,Insert,PS_J_ACTION_COUNTS'
display 'Insert-XferOut-&E.BUSINESS_UNIT: ' noline
display &E.BUSINESS_UNIT
begin-SQL On-Error=SQL-Error
INSERT INTO PS_J_ACTION_COUNTS(JOBCODE,JOBCODE_DESCR,BUSINESS_UNIT,BEGINS,HIRES,RETIRES,XFERSIN,XFERSOUT,TERMINATIONS,ENDS) VALUES(&E.JOBCODE,&EA.DESCR,&E.BUSINESS_UNIT,0,0,0,0,1,0,0)
end-SQL