Question about fncol function in dbmaint

53 views
Skip to first unread message

Carfield Yim

unread,
Mar 18, 2021, 10:29:52 AM3/18/21
to Kdb+ Personal Developers

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?

David Demner

unread,
Mar 18, 2021, 2:36:17 PM3/18/21
to personal...@googlegroups.com

No

 

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

 

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

 

 

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

 

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


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?

--
You received this message because you are subscribed to the Google Groups "Kdb+ Personal Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to personal-kdbpl...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/personal-kdbplus/bd115a9e-dfdf-499d-b9e4-553e97fd4f13n%40googlegroups.com.


This email, its contents and any files attached are a confidential communication and are intended only for the named addressees indicated in the message.

If you are not the named addressee or if you have received this email in error, you may not, without the consent of AquaQ Analytics, copy, use or rely on any information or attachments in any way. Please notify the sender by return email and delete it from your email system.

Unless separately agreed, AquaQ Analytics does not accept any responsibility for the accuracy or completeness of the contents of this email or its attachments. Please note that any views, opinion or advice contained in this communication are those of the sending individual and not those of AquaQ Analytics and AquaQ Analytics shall have no liability whatsoever in relation to this communication (or its content) unless separately agreed.

This e-mail message is intended to be received only by persons entitled to receive the confidential information it may contain. E-mail messages to clients of AquaQ Analytics may contain information that is confidential and legally privileged. Please do not read, copy, forward, or store this message unless you are an intended recipient of it. If you have received this message in error, please forward it to the sender and delete it completely from your computer system.
Reply all
Reply to author
Forward
0 new messages