# Question about fncol function in dbmaint

**URL:** <https://forum.kx.com/t/question-about-fncol-function-in-dbmaint/12121>\
**Category:** Community Support\
**Tags:** kdb-and-q\
**Created:** [March 18, 2021, 2:29pm UTC](https://forum.kx.com/t/question-about-fncol-function-in-dbmaint/12121 "2021-03-18T14:29:00Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![carfield11](https://avatars.discourse-cdn.com/v4/letter/c/ec9cab/32.png) [@carfield11](https://forum.kx.com/u/carfield11)\
**Post date:** [March 18, 2021, 2:29pm UTC](https://forum.kx.com/t/question-about-fncol-function-in-dbmaint/12121/1 "2021-03-18T14:29:00Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![david\_demner](https://avatars.discourse-cdn.com/v4/letter/d/7993a0/32.png) [@david\_demner](https://forum.kx.com/u/david_demner)\
**Post date:** [March 18, 2021, 6:36pm UTC](https://forum.kx.com/t/question-about-fncol-function-in-dbmaint/12121/2 "2021-03-18T18:36:00Z")

</div>

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) [[mailto: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
