cancel
Showing results for 
Search instead for 
Did you mean: 

Trying to use each right

ekallivrousis
New Contributor III

 

t:([x:(1 2 3);y:(`x`y`z)]z:"abc")
l:`x`y`z!(2;`y;"b")
select from t where (2#l) ~/:flip value flip key t

 

Shouldnt the above code be showing the second row in table? instead i get nothing back.

1 ACCEPTED SOLUTION

matt_moore
New Contributor II

Take a look at what each part of the where clause looks like:

// this is a dictionary
q)2#l
x| 2
y| `y
// and this is a nested list of your x and y columns with no rows matching above
q)flip value flip key t
1 `x
2 `y
3 `z


To correct, just key t

q)select from t where (2#l) ~/: key t
x y| z
---| -
2 y| b

 

View solution in original post

2 REPLIES 2

matt_moore
New Contributor II

Take a look at what each part of the where clause looks like:

// this is a dictionary
q)2#l
x| 2
y| `y
// and this is a nested list of your x and y columns with no rows matching above
q)flip value flip key t
1 `x
2 `y
3 `z


To correct, just key t

q)select from t where (2#l) ~/: key t
x y| z
---| -
2 y| b

 

View solution in original post

Thank you! this worked