0

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

helptomout
  • 195
  • 4
  • 9
  • 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 Jul 04 '12 at 02:08

1 Answers1

0

as daan kindly pointed out:

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