我有SQL查詢中提到像@Result
。 現在我想將@Result
的值分配給DFT的Execute SQL task
中聲明的變量。你能幫我嗎?在SSIS中,Hoew爲變量賦值?
這裏是查詢:
DECLARE @Result SMALLINT
DECLARE @VALUE SMALLINT
BEGIN
SET @VALUE = (SELECT Value
from dbo.LDMStockIntegrityCheck
where InterfaceName = 'I0180'
and FileName = 'PIZ.ED.NBFS001.PICSHT.DATA.LDM')
SET @Result = 0;
IF (@VALUE = 1)
BEGIN
Select @Result = count(*) from dbo.LDMIntegrityErrorLog
where InterfaceName = 'I0180' and FileName = 'PIZ.ED.NBFS001.PICSHT.DATA.LDM'
and CONVERT(VARCHAR(10), DateTime, 120) = CONVERT(VARCHAR(10), getdate(), 120);
END
END
你能告訴你的查詢你的實際做監守在'執行SQL Task'映射可以通過指定'做了什麼?' – praveen
請你幫我 –