我被要求發送電子郵件至我的員工有以下信息,我有:SSIS發送電子郵件任務使用變量
Excel文件(EmployeeInfo):
EmpID EmpName Rank PromoGift
1 Peter 5 1
2 Armand 4 2
3 Tommy 5 5
4 Sarah 2 4
5 Maria 3 3
CSV文件(促銷碼):
PromoID Validation
1 1
2 0
3 1
4 1
5 0
文本文件(PromoInfo)
PromoID Gift
1 100$ Apple GC
2 80$ Apple GC
3 60$ Apple GC
4 40$ Apple GC
5 20$ Apple GC
個
要求:
1. Only employees that has Validation = 1 will receive a gift.
2. The gift is based on the PromoID (PromoGift)
3. "Data Flow Task, Execute Sql Task, ForEach Loop & Send Mail" Task can only be used to execute the task above.
4. In the email, I need to replace the [...] accordingly.
5. Employee's email are neglect in this exercise.
我會發郵件給他們以下消息:
親愛的[EmpName],
這[CurrentYear],在我們的[事件名稱]你被選爲獲得下一關的等級[Rank]的贏家。您將收到[禮物]!
您的經理[經理]的禮物!
祝賀!
我該怎麼辦(我是SSIS的新手)?
創建3個數據流任務並將每個文件加載到SQL Server表中。然後使用SQL Task完成一個Join,這樣我就可以得到誰將會收到禮物的列表,然後接下來是什麼?我應該使用什麼將這些變量插入到我的電子郵件模板中?我相信我也需要創建變量。
有什麼想法?
我更喜歡在腳本任務中構建電子郵件,因爲您可以使用html。 – KeithL