ORA-00937: not a single-group group function
Posted: Mon 11 Jan 2010 16:07
Hi,
I have the following problem, this is my LINQ code:
Now I get this Error: ORA-00937: not a single-group group function
The debugging shows me this as SQL Result:
but the correct SQL must be this:
In the translation to SQL the GROUP BY t2."LlaeApplId" by is missing.
This happens when allUnioned is an IQueryable. If all Unioned is an IEnumerable the code works, but then I get a problem in another part of my coding because the list has more than 1000 entries. So I need it as an IQueryable.
It would be great if you could help me with this problem.
Thanks
Frank
I have the following problem, this is my LINQ code:
Code: Select all
var matchingRvals = from expAppl in allUnioned
group expAppl by expAppl into g
where g.Count() >= applIdsPerZone.Count
select g.Key;
The debugging shows me this as SQL Result:
Code: Select all
SELECT t1."LlaeApplId", t1.C1
FROM (
SELECT t2."LlaeApplId", COUNT(*) AS C1
FROM (
SELECT DISTINCT t3.LLAE_APPL_ID AS "LlaeApplId"
FROM VDI.LL_APPL_EXPERIENCE t3
WHERE t3.LLAE_RVAL_ID IN (:p0)
) t2
) t1
WHERE t1.C1 >= :p1
Code: Select all
SELECT t1."LlaeApplId", t1.C1
FROM (
SELECT t2."LlaeApplId", COUNT(*) AS C1
FROM (
SELECT DISTINCT t3.LLAE_APPL_ID AS "LlaeApplId"
FROM VDI.LL_APPL_EXPERIENCE t3
WHERE t3.LLAE_RVAL_ID IN (:p0)
) t2 GROUP BY t2."LlaeApplId"
) t1
WHERE t1.C1 >= :p1
This happens when allUnioned is an IQueryable. If all Unioned is an IEnumerable the code works, but then I get a problem in another part of my coding because the list has more than 1000 entries. So I need it as an IQueryable.
It would be great if you could help me with this problem.
Thanks
Frank