Problem description: -------------------- Cannot execute some query (with sysdate, rownum) when used with Oracle database. There is already a bug from 2010 that refer to this problem may be (READ IT): https://issues.apache.org/ooo/show_bug.cgi?id=108593 Steps to reproduce: -------------------- - Add the library ojdbc6.jar - Run query in Base - When i want retrieve the system date: SELECT TO_CHAR(sysdate, 'YYYY') FROM DUAL; Statut SQL: 42000 Code d'erreur: 904 / ORA-00904: "sysdate" : identificateur non valide Or if i use "ROWNUM" to limit result in query. Statut SQL: 42000 Code d'erreur: 904 / ORA-00904: ROWNUM : identificateur non valide All that query works if direcly executed in sqlplus tool from Oracle. Current behavior: -------------------- I got a error code, see above.. Expected behavior: -------------------- To return the result.. Platform (if different from the browser): Browser: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:13.0) Gecko/20100101 Firefox/13.0.1
@Rainer this bugreport is confirmes on https://issues.apache.org/ooo/show_bug.cgi?id=108593 What shall we do: status changing to "NEW"?
*** Bug 58796 has been marked as a duplicate of this bug. ***
Confirming, this appears to be inherited from the OOo code, so it has probably always been present in our versions, even from LO 3.3.x. Alex.
Is someone can work on it or tell me where the parser file is (BUG: 108593) in the source code of Libre Office ? I really need this enhancement.
@Lionel: Can you help here?
(In reply to comment #4) > Is someone can work (...) tell me where the parser file is > in the source code of Libre Office ? The lexer/parser is in connectivity/source/parse, files sqlflex.l and sqlbison.y I'll gladly review and apply your patch. Thanks in advance! After making the parser able to dynamically add new keywords, we would have to initialise the list of accepted keywords. When connecting through an ODBC driver we should initialise with: SQLGetInfo(,SQL_KEYWORDS,,,) AND the value of SQL_ODBC_KEYWORDS (see http://msdn.microsoft.com/en-us/library/windows/desktop/ms711681(v=vs.85).aspx ) I presume JDBC has a similar API call to get the datasource-specific keywords. If we can design a more generic solution that would not require LibO to know the database's keywords, that would be double plus extra good. I don't have an idea out of the top of my head right now.
I really would like help you and community but im not C++ developer. I analysed the code but is too complex for me. So if someone can work on this enhancement.. ;-)
Adding self to CC if not already on
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.