是否可以在 SSIS 包中生成类似于 PHP (trigger_error("xyz",E_USER_NOTICE)) 的用户通知到“执行结果”?
(未显示打印。)
//php//
trigger_error("100 rows effected", E_USER_NOTICE);
在 SSIS 包中执行数据流任务后使用的 TSQL 语句:
--T-SQL--
IF @COUNT_A_2 = 0 AND @COUNT_B_2 = 0
BEGIN
RAISERROR('Import.A_B', 16, 1) -- ######## USER_NOTICE ################
-- recert.A_B befüllen--
INSERT INTO recert.A_B (A_id, B_id)
SELECT K.A_id AS A_id, L.ID AS B_id
FROM dbo.K AS K
JOIN recert.L AS L ON K.B = L.name
WHERE NOT EXISTS ( SELECT * FROM recert.A_B AS D
WHERE D.A_id = K.A_id AND K.B = L.name
)
PRINT 'recert.A_B befüllt. / INSERT.A_B'
[...]
-- Leeren der Tabellen --
DELETE FROM [testdb].[dbo].[W]
END
ELSE
BEGIN
PRINT 'Daten nicht verarbeitet / NO data inserted'
RaisError('Daten nicht verarbeitet / NO data inserted',18,1)
-- stopps SISS Package. OK.
END