problem with Take on Query
Posted: Thu 24 Mar 2011 12:13
Hi,
I have following query :
var qry = context.patients.where(p=> X || Y); ( X and Y are some conditions ).
I want the query to return the first 51 rows,
so i return :
return qry.Take(51).ToList();
but the result is some 27000 records, because the generated sql is :
select ... from patientens where X or Y and rownum <= 51
instead of
select ... from patientens where (X or Y) and rownum <= 51
this does not seem correct behaviour to me .
greetings
Stijn
I have following query :
var qry = context.patients.where(p=> X || Y); ( X and Y are some conditions ).
I want the query to return the first 51 rows,
so i return :
return qry.Take(51).ToList();
but the result is some 27000 records, because the generated sql is :
select ... from patientens where X or Y and rownum <= 51
instead of
select ... from patientens where (X or Y) and rownum <= 51
this does not seem correct behaviour to me .
greetings
Stijn