Question about fncol function in dbmaint

HI all, it can apply some function to a column, but if it possible to apply some function to selected records of a column? Do something like “update price*2 from trade where sym=xxx”, is that possible?

No<o:p></o:p>

<o:p> </o:p>

You have to loop through allpaths and update that way. Something like this [totally untested] code:<o:p></o:p>

<o:p> </o:p>

{( sv x,price) set exec ?[sym=xxx;2;1]*price from x}peach allpaths[:.;tableName]<o:p></o:p>

<o:p> </o:p>

<o:p> </o:p>

From: personal-kdbplus@googlegroups.com [mailto:personal-kdbplus@googlegroups.com] On Behalf Of Carfield Yim
Sent: Thursday, March 18, 2021 7:30 AM
To: Kdb+ Personal Developers <personal-kdbplus@googlegroups.com>
Subject: [personal kdb+] Question about fncol function in dbmaint<o:p></o:p>

<o:p> </o:p>

CAUTION: External email. Do not click links or open attachments unless you recognize the sender and know the content is safe.<o:p></o:p>

HI all, it can apply some function to a column, but if it possible to apply some function to selected records of a column? Do something like “update price*2 from trade where sym=xxx”, is that possible?<o:p></o:p>


Submitted via Google Groups