插入输出Oracle

时间:2019-04-04 15:17:29

标签: oracle oracle11g ssis

在我构建的SSIS程序包中,我需要捕获Oracle中update子句的输出,以便发送警告电子邮件

我已经阅读了相关的问题Is there an Oracle equivalent to SQL Server's OUTPUT INSERTED.*?,但它没有给我合适的结果集,我可以通过执行SQL任务捕获结果

DECLARE
TYPE ra_InfoErrorMail is RECORD
(LFUKID Crpdta.F580002.LFUKID%TYPE
,LFAA10 Crpdta.F580002.LFAA10%TYPE
,LFJOBDETLS Crpdta.F580002.LFJOBDETLS%TYPE);
TYPE ta_InfoErrorMail is  TABLE OF ra_InfoErrorMail;
t_InfoErrorMail ta_InfoErrorMail;

BEGIN
UPDATE CRPDTA.F580002 SET LFKY = 'ERROR' WHERE LFAA10 = 'MYPROJECT' AND LFUSER ='MYUSER'
RETURNING  LFUKID,LFAA10,LFJOBDETLS   BULK COLLECT  INTO t_InfoErrorMail;


--SELECT LFUKID,LFAA10,LFJOBDETLS FROM t_InfoErrorMail t; -- this doesn't work


END;

如何在可通过SSIS捕获的整齐的ResultSet中获取整个t_InfoErrorMail?

0 个答案:

没有答案