Amazon simple DB select query with order by clause

381 Views Asked by At

I am trying to execute select query with order by in date field.

SELECT * FROM <domain> WHERE
LastModifiedDate is not null and 
FileName LIKE 'a%' 
order by lastmodifiedDate desc.

Query results client error Client 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.

How to add order by clause in amazon simple db.

1

There are 1 best solutions below

0
On
SELECT * FROM <domain> WHERE 
FileName LIKE 'a%' 
order by lastmodifiedDate desc.

is not null counts as the is null operator

you may be able to test for something else?