Strange rank error

It’s quite possible I’m missing something stupid, but shouldn’t the 2nd
expression work?

q){x,y}[0b;1b]
01b
q){select from (a:0101b;b:0011b) where a=x,b=y}[0b;1b]
'rank
q){select from (a:0101b;b:0011b) where a=x,b=1b}[0b]
a b

0 1

Hi Leon,

It’ll work if you use explicit parameters. i.e.

{[x;y]select from (a:0101b;b:0011b) where a=x,b=y}[0b;1b]

Hope that helps!

Matt Doherty
AquaQ Analytics

y is masked - see http://code.kx.com/wiki/Reference/select

so here you have to be explicit with declaring function args as it does not see y being used in the select.

q){[x;y]select from (a:0101b;b:0011b) where a=x,b=y}[0b;1b]

a b


0 1