Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

From what I can see, LibreOffice Base comes with an HSQLDB implementation by default. I understand that ODBC allows users to connect to different data sources, including databases that use different flavors of SQL.

What I'm significantly hazier on is this: Is there a way for me to use MySQL syntax within LibreOffice or OpenOffice? If so, would someone be able to describe it or link me to some docs? (I may just be using the wrong google queries.)

Whether you have an answer or not, thanks for your time in reading.

share|improve this question
up vote 1 down vote accepted

Make sure you download the correct 32 or 64 bit version depending on your version of libreoffice. install the odbc connector

control panel admin tools ODBC

User DSN Add Mysql ODBC......

New dialog dsn: whatever tcp/ip:

fill in the rest of the credentials Click test and make sure everything is OK.

when I launch libre office base 4.0.3 I get a database wizard What do you want to do?

Connect to an exiting database: select ODBC Browse select the ODBC you created above. connect using ODBC

username (again) check password if required

Finish Save name it whatever you want.

login again and your done

share|improve this answer
This definitely sets up the connection. I haven't tested the actual syntax yet, but since nobody else is answering, I'm definitely going to mark this as the accepted answer, since I really appreciate the time you took to submit detailed steps. In case you feel like going above and beyond: Do you know of any MySQL-specific query language I could use to test the syntax side of this -- something that wouldn't work in other versions of SQL? – HamComa Jun 24 '13 at 21:08
@user49982 Either you will be able to access it or not. select * from <tablename> should result in data. Unfortunately the statement is generic SQL, but it is still effective. The table exists on the server not inside of LibreOffice. If LibreOffice Base can see the data your in. – cybernard Jun 27 '13 at 15:50

The Query window (which can only be used for SELECT statements) by default has a Base parser which is optimized for the most common functions in an old version of HSQLDB (version 1.8 is what is bundled with OpenOffice, while the current version is 2.3). If you need to use a syntax in the query window that the parser objects to, you can turn off the parser by selecting Edit->Run SQL Command Directly.

If you want to run any kind of SQL that is not a SELECT statement, use the Tools->SQL window. This window always sends SQL directly to the database (no parser).

If you want to write an SQL statement inside a form or form control that the parser objects to, these objects have a property "Analyze SQL Command" that can be set to "No" to disable the parser.

Having the parser disabled on a query, form, or form control disables some form features that require the parser (notably field linking). Sometimes it is better to save the relevant SQL as a View.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .