Group By problem on PrepareStatement

Thread is closed for posting
4 posts, 0 answers
  1. Markus
    Markus avatar
    43 posts
    Member since:
    Sep 2008

    Posted 21 Mar 2009 Link to this post

    Hello,

    I have a problem on executing a OQL-Statement with Group By clause. I could reproduce this behavior with FirstStep model.

    Executing of query:  SELECT x, SUM(y.quantity) FROM OrderExtent x, x.details y GROUP BY x

    throws following exceptions:

    Error executing query: Telerik.OpenAccess.RT.sql.SQLException: Incorrect syntax near the keyword 'AS'.

    SQL:
    SELECT a.[ordr_id] AS COL1, SUM(c.[quantity]) AS  EXPR2 FROM [ordr] a JOIN [ordr_order_detail] AS b ON (a.[ordr_id] = b.[ordr_id]) JOIN [order_detail] AS c ON (b.[order_detail_id] = c.[order_detail_id]) GROUP BY a.[ordr_id] AS COL1 

    Generated sql statement is not correct. The 'AS COL1'  after 'GROUP BY' seems to be not allowed.


    Markus
  2. Jan Blessenohl
    Admin
    Jan Blessenohl avatar
    707 posts

    Posted 23 Mar 2009 Link to this post

    Hello Markus,
    That is indeed a problem with our sql generation. It has been fixed already. It looks like you can not use grouping in your query at the moment. We will provide a patch in 2-3 weeks that will fix your problem.

    Best wishes,
    Jan Blessenohl
    the Telerik team

    Check out Telerik Trainer , the state of the art learning tool for Telerik products.
  3. Kim Bouchard
    Kim Bouchard avatar
    13 posts
    Member since:
    Sep 2007

    Posted 29 Oct 2009 Link to this post

    Hi,

    has the above mentioned issue really been fixed ??
    I am using the lastest internal builds of ORM and i got exactly the same error message.

    Kind Regards
    Kim
  4. Jan Blessenohl
    Admin
    Jan Blessenohl avatar
    707 posts

    Posted 03 Nov 2009 Link to this post

    Hello Kim Bouchard,
    You are right, it is not yet fixed. Sorry for the wrong information, I am also astonished about it. Your post was a day to late to get it into the release, I will try to get it into the first service pack.

    All the best,
    Jan Blessenohl
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Back to Top