4
查看所有文檔。爲什麼這不起作用?加載的sp.q示例文件在KDB分發中給出。我無法弄清楚這個聲明有什麼問題。kdb更新語句
q) \l sp.q
q)trade
date sym time price size
-----------------------------------------
2007.07.23 a 04:48:52.665 73.53941 1000
2007.07.23 a 04:48:52.675 81.73358 600
2007.07.23 a 04:48:52.725 78.79526 900
2007.07.23 a 04:48:52.735 79.59502 600
2007.07.23 b 04:48:52.655 84.59765 200
2007.07.23 b 04:48:52.685 98.36199 500
2007.07.23 b 04:48:52.705 97.49875 700
2007.07.23 c 04:48:52.645 61.48308 900
2007.07.23 c 04:48:52.695 61.53192 700
2007.07.23 c 04:48:52.715 71.95405 200
q)trade:update size:300 from trade where sym=`c,price>71
'par
q)trade
date sym time price size
-----------------------------------------
2007.07.23 a 04:48:52.665 73.53941 1000
2007.07.23 a 04:48:52.675 81.73358 600
2007.07.23 a 04:48:52.725 78.79526 900
2007.07.23 a 04:48:52.735 79.59502 600
2007.07.23 b 04:48:52.655 84.59765 200
2007.07.23 b 04:48:52.685 98.36199 500
2007.07.23 b 04:48:52.705 97.49875 700
2007.07.23 c 04:48:52.645 61.48308 900
2007.07.23 c 04:48:52.695 61.53192 700
2007.07.23 c 04:48:52.715 71.95405 200
我可能是錯的,但他不應該[使用前'trade'反引號,而不是僅僅'trade'(HTTP:// WWW .thalesians.com/finance/index.php/KnowledgeBase/Databases/Kdb#Update_tables),所以他的表會被修改而不是被複制? – vladr
不,他在幹什麼,雖然這也會起作用: '更新大小:300來自\'交易其中sym = \ c,價格> 71,日期在(; )' –
mollmerx
您無法更新所有分區表,有或沒有反引號或日期條件。 –