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! Retrieving values from a dictionary using namespacing

Hi all, I would like to understand the following behaviour: If the dictionary values are all atoms of the same type, treating the dictionary as a namespace will throw an error when retrieving a value. Otherwise it seems to work ok. q)dict:`FAWF`faw`e...

eohara_kdb by New Contributor III
  • 612 Views
  • 1 replies
  • 0 kudos

Resolved! Why Q SQL doesn't work with "in"?

I have codes as below. Why the last line would fail? How to make it work? Thanks! t:([] c1:`a`b`a`c`b`c; c2:1 1 1 2 2 2; c3:10 20 30 40 50 60);select from t where c1 in enlist `a; // worksselect from t where c1 in `a`b; // works?[t;enlist (in;`c1;enl...

vivo by New Contributor III
  • 950 Views
  • 1 replies
  • 0 kudos

Resolved! Why sometimes the amend/index doesn't work?

In below code, a1 doesn't work. Any ideas why? myObj: (5 7; (`a; `b ; (4 5)));a3:.[myObj; 1 2 1; {count x}]; // i.e. ((5 7);(`a;`b;4 1))a2:.[myObj; 1 2; {count x}]; // i.e. ((5 7);(`a;`b;2))a1:.[myObj; 1; {count x}]; // i.e. it doesn't worka0:.[myObj...

vivo by New Contributor III
  • 1004 Views
  • 1 replies
  • 0 kudos