Order don´t work
I created a query in the query designer. I Trying to order by the column
"COUNT_2", see the select below:
SELECT ENDCID.CODEST, ENDCID.CODCID,
ENDCID.DESCID, COUNT(*) COUNT_2
FROM ENDLCL ENDLCL, ENDCID ENDCID
WHERE (ENDCID.CODCID = ENDLCL.CODCID)
GROUP BY ENDCID.CODEST, ENDCID.CODCID,
ENDCID.DESCID
ORDER BY ENDCID.CODEST, 4 DESC
This select was generated by reportBuilder. It problem is the ORDER
don´t work, is ordered only "ENDCID.CODEST".
But if I change directly the SQL: "ORDER BY ENDCID.CODEST, COUNT_2 DESC"
the ORDER work's correctly.
In this case, if a Change de SQL I lost the VISUAL TAB RECURSE. How can
I do this work correctly without lost VISUAL TAB RECURSE.
TIA
Verissimo
"COUNT_2", see the select below:
SELECT ENDCID.CODEST, ENDCID.CODCID,
ENDCID.DESCID, COUNT(*) COUNT_2
FROM ENDLCL ENDLCL, ENDCID ENDCID
WHERE (ENDCID.CODCID = ENDLCL.CODCID)
GROUP BY ENDCID.CODEST, ENDCID.CODCID,
ENDCID.DESCID
ORDER BY ENDCID.CODEST, 4 DESC
This select was generated by reportBuilder. It problem is the ORDER
don´t work, is ordered only "ENDCID.CODEST".
But if I change directly the SQL: "ORDER BY ENDCID.CODEST, COUNT_2 DESC"
the ORDER work's correctly.
In this case, if a Change de SQL I lost the VISUAL TAB RECURSE. How can
I do this work correctly without lost VISUAL TAB RECURSE.
TIA
Verissimo
This discussion has been closed.
Comments
Which database/connectivity are you using. If you enter the SQL
ReportBuilder creates directly into your database, do you get the same
effect?
--
Regards,
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
I am using Oracle8i / DBExpress. If I enter de SQL ReportBuilder creates
directly into database, the order work´s correcty.
TIA
Verissimo
All ReportBuilder does is enter the generated SQL into your database and
gather the data returned. Once you've completed designing your query are
you able to preview the data successfully? In my testing with our Oracle
database the following SQL statement worked correctly...
SELECT SALES.CUSTOMER_ID, SALES PRODUCT
SALES.AMOUNT, SUM(SALES.AMOUNT)
SUM_SALES_AMOUNT
FROM DEMO.SALES SALES
GROUP BY SALES.CUSTOMER_ID, SALES.PRODUCT
SALES.AMOUNT
ORDER BY SALES.CUSTOMER_ID, 4 DESC
--
Regards,
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com