Should the presence of a “where” clause in a query change the columnnames of the result?Consider the two queries below. Each is run against the same table andproduces the same rows. The first query produces columns named “x” and"w", which makes sense.The second query produces two columns named “x”, which seems odd.KDB+ 2.7 2011.04.30 Copyright (C) 1993-2011 Kx Systemsm32/ 2()core 4096MB andy mini.lan 10.0.1.10 PLAY 2011.07.29q)t:(x:1 2 3;y:2 3 4;z:3 4 5;w:1 1 2)q)tx y z w-------1 2 3 12 3 4 13 4 5 2q)select x:y by w from tw| x-| —1| 2 32| ,4q)select x:y by w where z<10 from tx| x-| —1| 2 32| ,4
10 (last token)?is not a valid?name
?
see 8 Default column names at http://kx.com/q/d/kdb+.htm
? Attila
On May 20, 6:44?pm, Attila Vrabecz <attila.vrab…> wrote:> 10 (last token) is not a valid nameHmm, OK…q)t:(x:1 2 3;y:2 3 4;z:3 4 5;w:1 1 2)q)foo:10;select x:y by w where z</attila.vrab…>
that?is not a where clause
it is the where function
? Attila
> that is not a where clause> it is the where functionAw, crap.q)foo:10;select bar:y by w,x where z