You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cassandra.apache.org by Sébastien Druon <sd...@spotuse.com> on 2011/05/02 12:01:58 UTC

CQL where clause and "OR"

Hi!

Is it possible to use an "OR" operator in the "WHERE" clause of a "SELECT"
statement? I do not find any documentation on that

i.e.
SELECT name1 FROM cf1 WHERE name1=value1 OR name1=value2

Thanks a lot in advance

Sébastien Druon

Re: CQL where clause and "OR"

Posted by Sébastien Druon <sd...@spotuse.com>.
Thanks Jonathan

Is there any documentation on "IN"?

On 2 May 2011 15:34, Jonathan Ellis <jb...@gmail.com> wrote:

> OR will not be supported for a while yet, however IN support is in
> trunk and will be in 0.8.1 (but not 0.8.0).
>
> On Mon, May 2, 2011 at 5:10 AM, Miguel Auso <mi...@groupalia.com>
> wrote:
> > hi!,
> > It`s posible
> > for exemple:
> > select * from aw_advancednewsletter_subscriptions where id='1' OR id='3';
> >
> >
> > Un Saludo
> > Miguel Ángel Ausó
> >
> >
> > 2011/5/2 Sébastien Druon <sd...@spotuse.com>
> >>
> >> Hi!
> >> Is it possible to use an "OR" operator in the "WHERE" clause of a
> "SELECT"
> >> statement? I do not find any documentation on that
> >> i.e.
> >> SELECT name1 FROM cf1 WHERE name1=value1 OR name1=value2
> >> Thanks a lot in advance
> >> Sébastien Druon
> >
>
>
>
> --
> Jonathan Ellis
> Project Chair, Apache Cassandra
> co-founder of DataStax, the source for professional Cassandra support
> http://www.datastax.com
>

Re: CQL where clause and "OR"

Posted by Jonathan Ellis <jb...@gmail.com>.
OR will not be supported for a while yet, however IN support is in
trunk and will be in 0.8.1 (but not 0.8.0).

On Mon, May 2, 2011 at 5:10 AM, Miguel Auso <mi...@groupalia.com> wrote:
> hi!,
> It`s posible
> for exemple:
> select * from aw_advancednewsletter_subscriptions where id='1' OR id='3';
>
>
> Un Saludo
> Miguel Ángel Ausó
>
>
> 2011/5/2 Sébastien Druon <sd...@spotuse.com>
>>
>> Hi!
>> Is it possible to use an "OR" operator in the "WHERE" clause of a "SELECT"
>> statement? I do not find any documentation on that
>> i.e.
>> SELECT name1 FROM cf1 WHERE name1=value1 OR name1=value2
>> Thanks a lot in advance
>> Sébastien Druon
>



-- 
Jonathan Ellis
Project Chair, Apache Cassandra
co-founder of DataStax, the source for professional Cassandra support
http://www.datastax.com

Re: CQL where clause and "OR"

Posted by Miguel Auso <mi...@groupalia.com>.
hi!,

It`s posible

for exemple:

select * from aw_advancednewsletter_subscriptions where id='1' OR id='3';



Un Saludo

Miguel Ángel Ausó



2011/5/2 Sébastien Druon <sd...@spotuse.com>

> Hi!
>
> Is it possible to use an "OR" operator in the "WHERE" clause of a "SELECT"
> statement? I do not find any documentation on that
>
> i.e.
> SELECT name1 FROM cf1 WHERE name1=value1 OR name1=value2
>
> Thanks a lot in advance
>
> Sébastien Druon
>