locked
Fetchxml Problem RRS feed

  • Question

  • Hi All,

    I have simple requirement, i need to get Max of Code sequence number in Channel Entity i wrote a Fetch xml Query like this

    "<fetch version='1.0' output-format='xml-platform' mapping='logical' distinct='false' aggregate='true' >

                    <entity name='vovinet_channel'>

                               <attribute name='vovinet_codesequencenumber' alias='sequencenumber_max' aggregate='max'/>

                 </entity>

    </fetch>"

     

    but it is not retriving data and while debugging i am seeing "Bad Request" in responsetext

    please help me,

    Thanks and Regards

    Ravi

     

     

    Wednesday, September 28, 2011 7:14 AM

Answers

  • Hi All,

     

    This problem is resolved, the problem is not with the query, but error of mistyping

     

    Thanks and Regards

    Ravi

    • Marked as answer by E Ravi kumar Thursday, September 29, 2011 4:09 AM
    Thursday, September 29, 2011 4:09 AM

All replies

  • Hi,

    An Aggregate function of type AVG, MIN, MAX, or SUM can only be applied to attributes of type integer, float, money, bigint or decimal.

    Check type of  vovinet_codesequencenumber attribute.

    Also try to execute Fetch XML query without aggregate function for test purpose.

     
     
    Wednesday, September 28, 2011 7:57 AM
  • Hi All,

     

    This problem is resolved, the problem is not with the query, but error of mistyping

     

    Thanks and Regards

    Ravi

    • Marked as answer by E Ravi kumar Thursday, September 29, 2011 4:09 AM
    Thursday, September 29, 2011 4:09 AM