performance - KDB+ / Q Syntax optimizations to oneliners -


i definitly q-mortal. q-baby. have question how put code separate lines one-liner. guess there way more elegant solution mine.

  1. how write following statements in 1 line:

    q)t1:(3#3)?\:`8 q)t1[;0]:`abc 
  2. in table creation, how can add column have list (like command ([]id:id_list;data:data_list;.....)). till creating table , doing inner join on them. guess that's not efficient:

    `id xkey update id:i flip (`row1`row2!(1 2;3 4)) 

for 1st 1 may do:

q)`abc,/:(3#2)?\:`8 abc jognjhck cihanjhp abc hkpblald aeajbddp abc blmjhgah ooeiogdj 

for 2nd 1 may treat table dictionary:

q)tb row1 row2 --------- 1    3    2    4    q)(tb`id): 5 6 q)tb row1 row2 id ------------ 1    3    5  2    4    6  

Comments

Popular posts from this blog

angularjs - ADAL JS Angular- WebAPI add a new role claim to the token -

php - CakePHP HttpSockets send array of paramms -

node.js - Using Node without global install -