0
votes

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

1
Try this: select * from flyers where eventDate >= '20120101' and clubId in('0001','0002') ORDER BY eventDate asc limit 20. Does that fix your problem? - Daan

1 Answers

0
votes

as daan kindly pointed out:

select * from flyers where eventDate >= '20120101' and clubId in('0001','0002') ORDER BY eventDate asc limit 20