SteveGuest
I was trying to update a partitioned table in kdb and I got a ‘par error.
How can I add a computed column to my results?
e.g. If I wanted to add 10 to the price column from my trade table?
q)update price+ 10 from trade
‘par
Only select queries work against partitioned tables. This is because those selects are specially optimised for using that virtual partitioned column. First select your data then perform the update. e.g. rather than:
update mprice:price+10 from trade where date=2017.17.01,sym=`A
do
update mprice:price+10 from (select from trade where date=2017.17.01,sym=`A)