Question

i am trying to create a query on my simpleDB. here is the query:

select * from flyers where eventDate >= '20120101' and clubId= '0001' OR clubId = '0002' ORDER BY eventDate asc limit 20

the problem is with:

clubId= '0001' OR clubId = '0002'

i get the error: [Invalid sort expression. The sort attribute must be present in at least one of the predicates, and the predicate cannot contain the is null operator.]

i would also like to be able to have up to 20 'OR''s chained together if it is possible

Was it helpful?

Solution

as daan kindly pointed out:

select * from flyers where eventDate >= '20120101' and clubId in('0001','0002') ORDER BY eventDate asc limit 20
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top