【发布时间】:2012-07-04 02:02:04
【问题描述】:
我正在尝试在我的 simpleDB 上创建一个查询。这是查询:
select * from flyers where eventDate >= '20120101' and clubId= '0001' OR clubId = '0002' ORDER BY eventDate asc limit 20
问题出在:
clubId= '0001' OR clubId = '0002'
我得到错误:[无效的排序表达式。 sort 属性必须至少存在于一个谓词中,并且该谓词不能包含 is null 运算符。]
如果可能的话,我还希望能够将多达 20 个“或”链接在一起
【问题讨论】:
-
试试这个:
select * from flyers where eventDate >= '20120101' and clubId in('0001','0002') ORDER BY eventDate asc limit 20。这能解决你的问题吗?
标签: php amazon-simpledb