Hi,

Thank you so much .

Could you tell me how to use the DISTINCT keyword here ?

On May 29, 11:00 am, Cong Danh Ho <congdanh...@gmail.com> wrote:
> Hi
>   PersistenceManager pm = PMF.get().
> getPersistenceManager();
> Query query = pm.newQuery(Student.class);
> query.setOrdering("school asc");
> List<Student> s= (List<Student>)
> (pm.newQuery(query).execute());
>
>
>
>
>
>
>
>
>
> On Sat, May 28, 2011 at 11:45 PM, Shoubhik <sbos...@gmail.com> wrote:
> > I need to write the corresponding query for
>
> >  SELECT * FROM Student  ORDER BY school ASC
>
> > How should I write that for a datastore query?
>
> >        PersistenceManager pm = PMF.get().getPersistenceManager();
>
> >       String query = "select from " + Student.class.getName()  +   "
> > ORDER by school asc where center == '"+center+"'";
>
> >         List<Student> s= (List<Student>)
> > (pm.newQuery(query).execute());
>
> > The above code isn't working after adding the   ** ORDER by school
> > asc  ** part !
> > What should I do ?
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "Google App Engine" group.
> > To post to this group, send email to google-appengine@googlegroups.com.
> > To unsubscribe from this group, send email to
> > google-appengine+unsubscr...@googlegroups.com.
> > For more options, visit this group at
> >http://groups.google.com/group/google-appengine?hl=en.
>
> --
>
> *Best regards,*
>
> *-------------------------------------------------------------------
> *
>
> *Hồ Công Danh*
> Developer
>  [M] : 094 7579 583
> [E] : congdanh...@gmail.com <linh...@viethungthai.vn>

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.

Reply via email to