In my case above , should not require group by no means , so that in tests in the mysql , firebird and hsqldb work out! Still H2DATABASE is very top , so I prefer him than any other DBMS to intranet desktop applications.
Em sexta-feira, 6 de novembro de 2015 13:27:50 UTC-3, Rami Ojares escreveu: > > Your statement is so full of errors that it is incomprehensible to me. > SELECT SUM (ALMOX.VALORUNT) FROM WAREHOUSE WHERE ALMOX ALMOX.COD_ITEM = 23 > ORDER BY DESC LIMIT 3 ALMOX.DTENTRADA > > Did you mean something like: > SELECT SUM(ALMOX.VALORUNT) > FROM WAREHOUSE AS ALMOX > WHERE ALMOX.COD_ITEM = 23 > ORDER BY ALMOX.DTENTRADA DESC > LIMIT 3 > (This assumes the implicit GROUP BY() that Lukas Eder was telling about a > while back). > > I wonder, how far do these other databases go when it comes to accepting > incorrect syntax? > > - Rami > > On 6.11.2015 15:51, Rogerio Queiroz wrote: > > > *JdbcURL: jdbc:h2:~/INVENTARIO1;AUTO_SERVER=TRUE;IFEXISTS=TRUE;WRITE_DELAY=0* > *user: sa, pass: dataview* > > OK! > > It is generating error when using the order by the following query: > SELECT SUM (ALMOX.VALORUNT) FROM WAREHOUSE WHERE ALMOX ALMOX.COD_ITEM = 23 > ORDER BY DESC LIMIT 3 ALMOX.DTENTRADA > > > I say I have to do a grouping *ALMOX.DTENTRADA* > > , so if I withdraw the order, the select normally performs. > > I tested on a database in MySQL, Firebird and hsqldb and this error does > not happen because of the sorting by ALMOX.DTENTRADA. > H2database version is *1.4.190* > This is a bug? > > *Grateful for the attention. I hope this helps.* > -- > You received this message because you are subscribed to the Google Groups > "H2 Database" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected] <javascript:>. > To post to this group, send email to [email protected] > <javascript:>. > Visit this group at http://groups.google.com/group/h2-database. > For more options, visit https://groups.google.com/d/optout. > > > -- You received this message because you are subscribed to the Google Groups "H2 Database" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/h2-database. For more options, visit https://groups.google.com/d/optout.
