我試圖運行使用SQL Server Management Studio 2008中SQL查詢:填充只
update Schema.[ClientNew]
set [Notes] = ([Notes]+ char(10)+(Select [Notes] from Schema.[clientOld]
where office = 90 and ID = '123456789AM')) where office = 90 and ID= '123456789'
基本上是試圖將所有數據在我的筆記領域從clientOld在clientnew結合備註字段下面的查詢空值。
這只是代碼的一部分。
當碎裂開來:
Select [Notes] from Schema.[clientOld] where office = 90 and ID = '123456789AM'
給我的備註字段數據。
但是,當我運行查詢時,只有{null}值出現在clientNew表上。
是我的查詢錯誤?或在某處寫入空值?
請指教,
ClientNew在Notes中有空值bef更新? –