locked
SDS orderby issue RRS feed

  • Question

  • I am trying to run following query in SDS explorer which executes with ordering first on author and second on id. It seems to be ok

    @"from e in entities where (e[""Author""] = ""{0}"" && e.Id > ""{1}"") ||  e[""Author""] > ""{0}""    orderby e["Author"], e.Id select e"

    But if i change same query as following

    @"from e in entities where (e[""Author""] = ""{0}"" && e.Id > ""{1}"") ||  e[""Author""] > ""{0}""    orderby e["Author"], e.Id descending select e"

    it does not execute with first order by auther and second by id.

    Is this behaviour by design or i am missing something
    Saturday, April 11, 2009 11:48 AM

Answers

  • Deval,

    I suggest you read about our announcment http://blogs.msdn.com/ssds/archive/2009/03/10/9469228.aspx regarding the ACE model. We will no longer be supporting the ACE model or the corresponding query language.

    Rick Negrin
    Sunday, April 12, 2009 11:58 PM
  • Hi,

    I think Rick is right.

    on order by with descending try with one entities element(May be multiple entities element is not supported  orderby descending). 
    You can try like orderby  like

    @"from e in entities where (e[""Author""] = ""{0}"" && e.Id > ""{1}"") ||  e[""Author""] > ""{0}""    orderby e["Author"] descending select e"

    it will work.


    Regards
    Kapil

    • Proposed as answer by Kaps Pune Tuesday, April 14, 2009 6:02 AM
    • Marked as answer by Stan Kitsis - MSFT Wednesday, April 15, 2009 11:11 PM
    Tuesday, April 14, 2009 6:01 AM

All replies

  • Deval,

    I suggest you read about our announcment http://blogs.msdn.com/ssds/archive/2009/03/10/9469228.aspx regarding the ACE model. We will no longer be supporting the ACE model or the corresponding query language.

    Rick Negrin
    Sunday, April 12, 2009 11:58 PM
  • Hi,

    I think Rick is right.

    on order by with descending try with one entities element(May be multiple entities element is not supported  orderby descending). 
    You can try like orderby  like

    @"from e in entities where (e[""Author""] = ""{0}"" && e.Id > ""{1}"") ||  e[""Author""] > ""{0}""    orderby e["Author"] descending select e"

    it will work.


    Regards
    Kapil

    • Proposed as answer by Kaps Pune Tuesday, April 14, 2009 6:02 AM
    • Marked as answer by Stan Kitsis - MSFT Wednesday, April 15, 2009 11:11 PM
    Tuesday, April 14, 2009 6:01 AM