SSIS OLE DB命令更新表

时间:2016-06-22 14:36:00

标签: ssis

    DECLARE @FK_Thread INT ; 
    DECLARE @AccountName NVARCHAR(128);
    DECLARE @AccountCode NVARCHAR(128);

    SET @FK_Thread = ? ;
    SET @AccountName = ? ; /*value that I want for the column to use in update */
    SET @AccountCode = ?; 

    /*I wanted to Update a Table using SSIS OLD DB Command */

    UPDATE acc
    /*whatever the new accountname I want to set this to update in this column*/ 
    SET  gls.AccountName =@AccoutName  
    FROM Account acc
    INNER JOIN  Thread th
    ON acc.FK_Thread= th.PK_Thread
    INNER JOIN POST p 
    P.PK_Post = th.FK_Post
    WHERE 
    th.FK_Thread = @FK_Thread AND acc.AccountCode = @AccoutCode
    GROUP BY p.PostCode asc ;  
    //Here I also want to filter for with my BatchID which is a user defined variable 
    (DT_I4)@[User::BatchKey]

当我进行直接更新时还有一件事 喜欢

 UPDATE Account SET AccountName= ? 
    WHERE 
    AccoutCode = ?
    AND 
    FK_Thread = ? // This works but I cannot group by PostCode in order to  filter and show appropriate error message 

在我获得"无法绑定参数之前,我已将DelayValidation变为FALSE" 我得到的错误 enter image description here

0 个答案:

没有答案