UPDATE Newchat
Set [Answered] = (Select b.[Answered]
From Table1 b
where Newchat.CHAT_ID = b.[Chat ID]
and Newchat.Chat_Date >= '2017-Feb-22' and Newchat.Chat_Date <= '2017-Feb-28');
每當我運行此代碼時,[已應答]的所有行都將變爲空,除了此日期。 請建議。SQL服務器更新語句變爲空
我也嘗試應用過濾器 「Newchat。[回答]不爲空」
UPDATE Newchat
Set [Answered] = (Select b.[Answered]
From Table1 b
where Newchat.CHAT_ID = b.[Chat ID] and Newchat.[Answered] is not null
and Newchat.Chat_Date >= '2017-Feb-22' and Newchat.Chat_Date <= '2017-Feb-28');
這也不起作用。