I'm trying to select top 100 from distinct set of column values. The query being generated is as follows
SELECT
"Limit1".CATEGORY_NM AS CATEGORY_NM
FROM ( SELECT DISTINCT
"Extent2".CATEGORY_NM AS CATEGORY_NM
FROM PROJECTITEM "Extent1"
LEFT OUTER JOIN CATEGORY "Extent2" ON "Extent1".CATEGORY_ID = "Extent2".CATEGORY_ID
WHERE ("Extent1".PROJECT_ID = 8070) AND ROWNUM <= 100
) "Limit1"
this entity framework query is as follows query.Select(select).Distinct().Take(100).ToList()
the part related to ROWNUM <= 100 should be part of the outer query. Any work around for this ?
I'm using .net entity framework with dot connect for oracle.
.net entity framrwork oracle select distinct issue
Thank you for your report. We will investigate the situation and try to fix it. We will post here about the results.
Here is a workaround:
=>
Here is a workaround:
Code: Select all
.Select(a => a.SomeValue)
.Distinct()
.Take(100)
Code: Select all
.Select(a => a.SomeValue)
.Distinct()
.OrderBy(a => a)
.Take(100)
New build of dotConnect for Oracle 6.50.237 is available for download now!
It can be downloaded from http://www.devart.com/dotconnect/oracle/download.html (trial version) or from Registered Users' Area (for users with valid subscription only).
For more information, please refer to http://www.devart.com/forums/viewtopic.php?t=22379 .
It can be downloaded from http://www.devart.com/dotconnect/oracle/download.html (trial version) or from Registered Users' Area (for users with valid subscription only).
For more information, please refer to http://www.devart.com/forums/viewtopic.php?t=22379 .