2013-02-27 118 views
-1

我有一個小的查詢,當我運行它時,出現錯誤。請幫幫我。 查詢:子查詢在sql中返回了超過1個值

update MozendaData set [Sub Device]= 
(select [Sub Device] from oldMozendaData 
    where MozendaData.[Product Details]=oldMozendaData.[Product Details]) 
where UserID ='APAC\gsvivekanand' 
+0

SQL 2008服務器 – user1632718 2013-02-27 06:44:43

回答

0

試試這個:

UPDATE m 
SET m.[Sub Device] = o.[Sub Device] 
FROM MozendaData AS m 
INNER JOIN oldMozendaData AS o ON m.[Product Details] = o.[Product Details] 
WHERE m.UserID ='APAC\gsvivekanand'; 
+0

感謝其任職 – user1632718 2013-02-27 06:50:01

+0

@ user1632718 - 歡迎你隨時:)嘗試去接受它,如果你有幫助。 – 2013-02-27 06:51:30

相關問題