I want to use a query to add rowno in a selection: select (Select Sum(1) from orte O where O.ID<OT.ID), * from orte OT but i get an Error from the sql-Statement
Hi, How exactly are you passing this SQL statement ? If you are using the built-in SQL parser, certain queries do not work e.g. functions other than aggregates, group by, order by, sum, etc. The only way to get these to work is to turn off the LibO SQL parser. In general, you should also clearly identify your table names, e.g. "dbname"."table1" and surround them in double quotes. Sometimes, the LibO parser does get this wrong (there is a OpenOffice.org bug report for that somewhere). Alex
I will not consider this as a valid bug report until I have more detailed information on how to reproduce the behaviour, with a sample ODB file containing the query and table for example. Alex
[This is an automated message.] This bug was filed before the changes to Bugzilla on 2011-10-16. Thus it started right out as NEW without ever being explicitly confirmed. The bug is changed to state NEEDINFO for this reason. To move this bug from NEEDINFO back to NEW please check if the bug still persists with the 3.5.0 beta1 or beta2 prereleases. Details on how to test the 3.5.0 beta1 can be found at: http://wiki.documentfoundation.org/QA/BugHunting_Session_3.5.0.-1 more detail on this bulk operation: http://nabble.documentfoundation.org/RFC-Operation-Spamzilla-tp3607474p3607474.html
needinfo keyword redundant by needinfo status.
I testet under 3.5 beta2 and the error is the same
Stephan: - did you try to reproduce this problem on a brand new document with 3.5.0 ? (with, if possible, brand new LO profile) - could you attach the file and give the details suggested by Alexander ? It may help a lot to understand the cause of the problem since we could try on Linux or Mac and see if there are error/warn messages.
Hi Stefan, Without the table structure being used, the type of db, and some sample data, it is impossible to tell whether the problem is a parser one linked to the use of ALIASes, misinterpretation of 0 (zero) as INT/VARCHAR, or some failure to support the specific SQL instruction (e.g. sub-selects). Without further info, I will close this bug as invalid. Alex
(In reply to comment #0) > I want to use a query to add rowno in a selection: > > select (Select Sum(1) from orte O where O.ID<OT.ID), * from orte OT > > but i get an Error from the sql-Statement Hallo Stefan, A bisserl mehr Infos könnten wir gut gebrauchen... Alex
Am 27.02.2012 07:44, schrieb bugzilla-daemon@freedesktop.org: > https://bugs.freedesktop.org/show_bug.cgi?id=38340 > > --- Comment #8 from Alex Thurgood<iplaw67@yahoo.co.uk> 2012-02-26 22:44:29 PST --- > (In reply to comment #0) >> I want to use a query to add rowno in a selection: >> >> select (Select Sum(1) from orte O where O.ID<OT.ID), * from orte OT >> >> but i get an Error from the sql-Statement > > Hallo Stefan, > A bisserl mehr Infos könnten wir gut gebrauchen... > > > Alex > In base kann man keinen Befehl schreiben, der einen pro Zeile die Zeilennummer ausgibt, dieses ist für Listen sehr hilfreich
(In reply to comment #9) > > > In base kann man keinen Befehl schreiben, der einen pro Zeile die > Zeilennummer ausgibt, dieses ist für Listen sehr hilfreich Translation : In Base it is not possible to write a (SQL) statement that gives a line number per returned tuple, which is very useful for lists. So Stefan, if I understand what you want : 1 string1 2 string2 3 string 3 4 string 4 etc, etc ?? But that still doesn't explain your SQL statement - which database have you been using where a statement like the one you have given works. At least, that would tell us which dialect of SQL you are using ? Alex
(In reply to comment #10) > (In reply to comment #9) > > > > > > In base kann man keinen Befehl schreiben, der einen pro Zeile die > > Zeilennummer ausgibt, dieses ist für Listen sehr hilfreich > > Translation : > In Base it is not possible to write a (SQL) statement that gives a line number > per returned tuple, which is very useful for lists. > > So Stefan, if I understand what you want : > > 1 string1 > 2 string2 > 3 string 3 > 4 string 4 > etc, etc ?? > I would add that I don't understand why a simple autoincrement primary key field wouldn't solve the problem. All you would need then is a SELECT ALL. Sorry, but your problem is too vague and I don't see anyway to reproduce the buggy behaviour you claim exists without trying to guess what it is exactly you have started with, and what you are trying to achieve. Alex
Hi Stefan, Please answer the questions. Otherwise this bugreport will be closed. Alternatively ask your question on a mailing list or in a forum
I found a other solution so you can close this thread