This is a migrated thread and some comments may be shown as answers.
Group By problem on PrepareStatement
3 Answers 43 Views
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Markus
Top achievements
Rank 1
Markus asked on 21 Mar 2009, 01:53 PM
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

3 Answers, 1 is accepted

Sort by
0
Jan Blessenohl
Telerik team
answered on 23 Mar 2009, 03:17 PM
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.
0
Kim Bouchard
Top achievements
Rank 1
answered on 29 Oct 2009, 10:30 AM
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
0
Jan Blessenohl
Telerik team
answered on 03 Nov 2009, 02:23 PM
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.
Tags
General Discussions
Asked by
Markus
Top achievements
Rank 1
Answers by
Jan Blessenohl
Telerik team
Kim Bouchard
Top achievements
Rank 1
Share this question
or