bug Take and Skip to Oracle views

bug Take and Skip to Oracle views

Postby Morpheus » Fri 25 Sep 2009 14:23

Hello,

I would like to paginate a list of information provided by a view. I use skip and take without forgetting to sort the list. For this I use Entity SQL.

The query is Entite SQL:
Code: Select all
Select VALUE s from EntitiesSTN.SocieteDso as s
ORDER BY s.RAISONSOCIALE ASC

I therefore:
Code: Select all
             IQueryable listeSociete = null;
             if (numLigneDebut == 0 & & numLigneFin> 0)
                 listeSociete = query.Take ((int) numLigneFin);
             if (numLigneDebut> 0 & & numLigneFin> 0)
                 listeSociete = query.Skip ((int) numLigneDebut). Take ((int) numLigneFin);


The query generated is:
Code: Select all
SELECT
"Project1".CODECLIENT AS CODECLIENT,
"Project1".CODECLIENTFONCTIONNEL AS CODECLIENTFONCTIONNEL,
"Project1".CODESTATISTIQUE1 AS CODESTATISTIQUE1,
"Project1".CODESTATISTIQUE2 AS CODESTATISTIQUE2,
"Project1".CODESTATISTIQUE3 AS CODESTATISTIQUE3,
"Project1".CODESTATISTIQUE4 AS CODESTATISTIQUE4,
"Project1".CODESTATISTIQUE5 AS CODESTATISTIQUE5,
"Project1".TYPESOCIETE AS TYPESOCIETE
FROM ( SELECT "Project1".CODECLIENT AS CODECLIENT, "Project1".CODECLIENTFONCTIONNEL AS CODECLIENTFONCTIONNEL, "Project1".CODESTATISTIQUE1 AS CODESTATISTIQUE1, "Project1".CODESTATISTIQUE2 AS CODESTATISTIQUE2, "Project1".CODESTATISTIQUE3 AS CODESTATISTIQUE3, "Project1".CODESTATISTIQUE4 AS CODESTATISTIQUE4, "Project1".CODESTATISTIQUE5 AS CODESTATISTIQUE5,"Project1".TYPESOCIETE AS TYPESOCIETE, row_number() OVER (ORDER BY ,"Project1".RAISONSOCIALE ASC) AS "row_number"
   FROM ( SELECT
      "Extent1".CODECLIENT AS CODECLIENT,
      "Extent1".CODECLIENTFONCTIONNEL AS CODECLIENTFONCTIONNEL,
      "Extent1".CODESTATISTIQUE1 AS CODESTATISTIQUE1,
      "Extent1".CODESTATISTIQUE2 AS CODESTATISTIQUE2,
      "Extent1".CODESTATISTIQUE3 AS CODESTATISTIQUE3,
      "Extent1".CODESTATISTIQUE4 AS CODESTATISTIQUE4,
      "Extent1".CODESTATISTIQUE5 AS CODESTATISTIQUE5,
      "Extent1".TYPESOCIETE AS TYPESOCIETE
      FROM (
              SELECT
              VUESOCIETESDSO.CODECLIENT AS CODECLIENT,
              VUESOCIETESDSO.CODECLIENTFONCTIONNEL AS CODECLIENTFONCTIONNEL,
              VUESOCIETESDSO.CODESTATISTIQUE1 AS CODESTATISTIQUE1,
              VUESOCIETESDSO.CODESTATISTIQUE2 AS CODESTATISTIQUE2,
              VUESOCIETESDSO.CODESTATISTIQUE3 AS CODESTATISTIQUE3,
              VUESOCIETESDSO.CODESTATISTIQUE4 AS CODESTATISTIQUE4,
              VUESOCIETESDSO.CODESTATISTIQUE5 AS CODESTATISTIQUE5,
              VUESOCIETESDSO.TYPESOCIETE AS TYPESOCIETE
              FROM STN_DEV_DBA.VUESOCIETESDSO VUESOCIETESDSO
            ) "Extent1"
      WHERE ("Extent1".IDMEMBRE = :Param1) AND ("Extent1".TYPESOCIETE = :Param2)
   )  "Project1"
   ORDER BY "Project1".RAISONSOCIALE ASC
)  "Project1"
WHERE "Project1"."row_number" > 149 AND  ROWNUM <= (299)
ORDER BY "Project1".RAISONSOCIALE ASC


He is completely lost. Why he did it:
WHERE "Project1". "Row_number"> 149 AND ROWNUM <= (299)
it
row_number () OVER (ORDER BY ,"Project1". RAISONSOCIALE ASC) AS "row_number"
as if he missed a field

Someone Does he have any idea?
Thank you
Morpheus
 
Posts: 3
Joined: Fri 25 Sep 2009 14:01

Postby Morpheus » Fri 25 Sep 2009 14:49

It's fixed on the latest version
Morpheus
 
Posts: 3
Joined: Fri 25 Sep 2009 14:01


Return to dotConnect for Oracle