download free 30 days trial version buy simpledb explorer
Documentation   Download   Purchase   Support   FAQs    Forum    ScreenShots & Demos       

What wrong with this query ?

Support for SDBExplorer - A Simple Database Explorer for Amazon's SimpleDB

What wrong with this query ?

Postby Mifflin » May 21st, '10, 06:12

Hi,
I couldn't make this query run select * from <domain> order by <attribute> asc. Throwing exception The sort attribute must be present in at least one of the predicates, and the predicate cannot contain the is null operator.

Any help will be appropriated.
Thanks
Mifflin
 

Re: What wrong with this query ?

Postby Ashish Pancholi » May 21st, '10, 13:50

The format of Select API is
Code: Select all
select output_list 
from domain_name 
[where expression] 
[sort_instructions] 
[limit limit]

In your case the exception is Invalid Sort Expression. Your query statement require attest one predicate for where clause.

Thanks
Ashish Pancholi
 
Posts: 38
Joined: May 11th, '09, 10:03

Re: What wrong with this query ?

Postby Ashish Pancholi » May 21st, '10, 13:50

You can run query :-

select * from <domain> where <Attribute> is not null order by <Attribute> asc/desc

Thanks
Ashish Pancholi
 
Posts: 38
Joined: May 11th, '09, 10:03

Re: What wrong with this query ?

Postby Mifflin » May 25th, '10, 07:27

Thanks for help but I am not getting results sorted for the given Attribute in above SELECT Query?
Mifflin
 

Re: What wrong with this query ?

Postby Ashish Pancholi » May 25th, '10, 07:31

In this version of SDB Explorer, by default we are showing the sorted data by the first attribute name in ascending order.

You can select the desired attribute by which you would like to sort in combo box near sort by button. Check either ascending or descending as per your choice. Click on Sort By button and you will get your data in sorted order as per your selected attribute.

You can also get your sorted results by SELECT API in our next release.

Thanks
Ashish Pancholi
 
Posts: 38
Joined: May 11th, '09, 10:03

Re: What wrong with this query ?

Postby Remon hill » May 27th, '10, 06:08

Hi,

I am using SDB Explorer, I am trying a query to search a record from a domain but it did not work . my query is -
select * from <domain-name> where Sdb-Item-Name='101010'

Though,I can do this with the "Search Item Name" option available on the domain as it works perfect but i just wanna know , why the above query went wrong?

Thanks,
Remon hill
Remon hill
 

Re: What wrong with this query ?

Postby Dushyant Kumar Masta » May 27th, '10, 12:29

Hi,

You must try the query like :

Select * from <domain-name> where itemname()='101010' since SdbItemName is not the Attribute, it just a display name for the first column in each domain in the SDB Explorer.


Thanks,
Dushyant Kumar Masta
Dushyant Kumar Masta
 

Re: What wrong with this query ?

Postby Justin » May 28th, '10, 05:22

I couldn't make it run : -
select * from mydomain where Age < '25' and Year < '2010'.

Plse help.

Thanks
Justin
 

Re: What wrong with this query ?

Postby Ashish Pancholi » May 28th, '10, 14:57

Both predicates must be same in your query.

Thanks
Ashish Pancholi
 
Posts: 38
Joined: May 11th, '09, 10:03


Return to Amazon SimpleDB

cron