kdb+ and q
Q+A on all things kdb+ database and the q language
cancel
Showing results for 
Search instead for 
Did you mean: 

Forum Posts

Resolved! each-both creating a projection

Hi Community,If I have a function takes 3 inputs where I want to set the 3rd argument to be `field and I want to iterate over 2 lists using each-both, but the below creates a projection:{.my.func[x;y;`field]} ' [value exec col1, col2 from tab1]Would ...

kdb_newbie by New Contributor II
  • 695 Views
  • 3 replies
  • 0 kudos

Resolved! How does (first'') works?

dict:`a`b`c!((enlist 1; enlist `a);(enlist 2;enlist `b);(enlist 3;enlist `c))q)(first'') dicta| 1 `ab| 2 `bc| 3 `cq)(first') dicta| 1b| 2c| 3q)How does (first'') work, please? And then how would (first''') work?Thank you!

kdb_newbie by New Contributor II
  • 365 Views
  • 1 replies
  • 0 kudos

Resolved! why sv needs ,' here?

I have the below trades table in my q session: q)meta trades c | t f a -----| ----- time | p sym | s g src | s g price| f size | i q) Then, why does it need each both for the sv function when x and y are joined already and then passed into sv: q)upda...

kdb_newbie by New Contributor II
  • 565 Views
  • 2 replies
  • 0 kudos

Resolved! May I please know how the over iterator is being used here?

Which form of iterator is being used here? Thank you! https://code.kx.com/q4m3/A_Built-in_Functions/#a88-ssr You can use the over iterator with ssr to replace multiple items. (ssr/)["results_%div_%dept.csv"; ("%div";"%dept"); ("banking";"m&a")]

kdb_newbie by New Contributor II
  • 568 Views
  • 3 replies
  • 0 kudos

Resolved! {$["j";x in V]'[x;"_"]} / Case

https://code.kx.com/q/learn/reading/strings/#c_ns_n_nts {$["j";x in V]'[x;"_"]} / Case May I ask how does each both work here please?

kdb_newbie by New Contributor II
  • 502 Views
  • 1 replies
  • 0 kudos