SQL批量更新

UPDATE a
SET a.AssignUserID=b.UserID
FROM LeadsTask a
INNER JOIN ProjectTask_Employee b ON a.TaskID=b.PTID
WHERE a.Status=2 AND ISNULL(a.AssignUserID,-2)<0
AND ISNULL(b.UserID,-2)>0

 

posted @ 2015-11-27 14:56  stevejson  阅读(437)  评论(0编辑  收藏  举报