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