# Strange rank error

**URL:** https://forum.kx.com/t/strange-rank-error/8973
**Category:** Community Support
**Tags:** kdb-and-q
**Created:** [July 21, 2014, 4:07pm UTC](https://forum.kx.com/t/strange-rank-error/8973 "2014-07-21T16:07:00Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![leonbaum2](https://avatars.discourse-cdn.com/v4/letter/l/b3f665/32.png) [@leonbaum2](https://forum.kx.com/u/leonbaum2)
#### Post date: [July 21, 2014, 4:07pm UTC](https://forum.kx.com/t/strange-rank-error/8973/1 "2014-07-21T16:07:00Z")

</div>

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

---

<div class="post-metadata">

### Author: ![matt\_d\_doc](https://avatars.discourse-cdn.com/v4/letter/m/5e9695/32.png) [@matt\_d\_doc](https://forum.kx.com/u/matt_d_doc)
#### Post date: [July 21, 2014, 4:11pm UTC](https://forum.kx.com/t/strange-rank-error/8973/2 "2014-07-21T16:11:00Z")

</div>

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

---

<div class="post-metadata">

### Author: ![charlie1](https://avatars.discourse-cdn.com/v4/letter/c/ec9cab/32.png) [@charlie1](https://forum.kx.com/u/charlie1)
#### Post date: [July 21, 2014, 4:11pm UTC](https://forum.kx.com/t/strange-rank-error/8973/3 "2014-07-21T16:11:00Z")

</div>

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
