1
我有一些這樣的代碼:SQL語法幫助 - 更新
Update table_name
set
[column] = case when d.data is null, then null else d.columnname end.
from...
etc
我的問題是,我該如何建立一個函數,其中的「其他d.columnname」是總結幾列的聯接。
難道是這樣的:
...then null else sum(d.column1 + rf.column2 + rwf.column3) as tempcolumn end,
或
...then null else (d.column1 + rf.column2 + rwf.column3) end,
什麼是做在這組形勢柱和正確的方法是什麼?
你有沒有嘗試過任何一個? – JNK 2011-05-27 15:24:54
是的,一個工作沒有錯誤,但它說0行更新,我100%肯定這應該更新一行,所以我認爲我有一些不好的語法 – 2011-05-27 15:26:10