You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cassandra.apache.org by Keith Freeman <8f...@gmail.com> on 2013/08/06 18:35:39 UTC
CQL3 select between is broken?
I've been looking at examples about modeling series data in Cassandra,
and in one experiment created a table like this:
> create table vvv (k text, t bigint, value text, primary key (k, t));
After inserting some data with identical k values and differing t
values, I tried this query (which is nearly identical to another example
I found on the mailing list):
> cqlsh:smdbxp> select * from vvv where k = 'a' and t between 111 and 222;
> Bad Request: line 1:54 no viable alternative at input '222'
Why doesn't that work? Is the syntax of the select wrong for CQL3? (I'm
running 1.2.8)
Re: CQL3 select between is broken?
Posted by David Ward <da...@shareablee.com>.
http://cassandra.apache.org/doc/cql3/CQL.html#selectStmt
try `and t > 111 and t < 222' or >= and <= if you want inclusive.
On Tue, Aug 6, 2013 at 10:35 AM, Keith Freeman <8f...@gmail.com> wrote:
> I've been looking at examples about modeling series data in Cassandra, and
> in one experiment created a table like this:
>>
>> create table vvv (k text, t bigint, value text, primary key (k, t));
>
> After inserting some data with identical k values and differing t values, I
> tried this query (which is nearly identical to another example I found on
> the mailing list):
>>
>> cqlsh:smdbxp> select * from vvv where k = 'a' and t between 111 and 222;
>> Bad Request: line 1:54 no viable alternative at input '222'
>
> Why doesn't that work? Is the syntax of the select wrong for CQL3? (I'm
> running 1.2.8)