Apache OpenOffice (AOO) Bugzilla – Issue 98115
"Edit" is a different SQL from "Edit in SQL View"
Last modified: 2009-03-27 09:10:28 UTC
Please open the sample odb file. Reproduce: 1. - Select query1 - Right Click - Select "Edit in SQL View" Look at "Edit in SQL View" image file. 2. - Select query1 - Right Click - Select "Edit" Look at "Edit" image file. Two results are different. I think SQL of "Edit" not to change. Reference: http://oooug.jp/faq/index.php?faq/4/1383
作æˆã•ã‚ŒãŸæ·»ä»˜ (id=59404) sample odb file
作æˆã•ã‚ŒãŸæ·»ä»˜ (id=59405) "Edit in SQL View" image
作æˆã•ã‚ŒãŸæ·»ä»˜ (id=59406) "Edit" image
Confirmed using OOO300_m15 (3.0.1 RC2), DEV300_m37 and OOo 2.4.1 / Ubuntu Results are the same for all 3 releases Open the bug doc Execute the query "query1" by double clicking - the result set returned is NOT correct Open query1 for edit then execute it - the result set is correct With the query still open turn the Designer view off and execute - Result set returned is correct Close the query Open the query "Edit in SQL view" and execute it - the result set returned is NOT correct
assign to developer
This seems to have to do with the Colmn names returned in the result set. If you open the query and add anlias for the two columns using Averge and Count funcitons the problems disappear in all cases. Running the query directly or opening in SQL view return the correct SQL statement and result set.
returning incorrect query results is a P2, and should be fixed for the next release, if possible. fs->atjensen: please don't be that shy in assigning targets - if you don't assign one, the issue has a good chance to be overlooked, if you do, the worst thing which can happen is that it will be corrected :)
Open the query in edit mode results in: SELECT "Code", AVG( "Price" ), COUNT( "Price" ) FROM "table1" AS "table1" GROUP BY "Code" HAVING ( ( COUNT( "Price" ) >= 4 ) ) ORDER BY "Code" ASC and switching from design in edit mode results in SELECT "Code", AVG( "Price" ), COUNT( "Price" ) FROM "table1" AS "table1" GROUP BY "Code" HAVING ( ( AVG( "Price" ) >= 4 ) ) ORDER BY "Code" ASC The difference is in the having clause. COUNT or AVG
Fixed in cws dba31h
Please verify. Thanks.
verified in CWS dba31h find more information about this CWS, like when it is available in the master builds, in EIS, the Environment Information System: http://eis.services.openoffice.org/EIS2/cws.ShowCWS?Path=DEV300%2Fdba31h
Verified in DEV310m7 on WinXP. Now, there is no difference in having clause. Well done. Closing Li Meiying