Ask Your Question

SQL coding in Base

asked 2015-05-21 12:21:55 +0200

GJim gravatar image

updated 2015-08-26 21:09:31 +0200

Alex Kemp gravatar image

I'm using LO version on Kubuntu 14.04 LTS.

I've just recently moved to Kubuntu from Windows7. I have extensive experience using MS-Access and the SQL structure there.

I have a very extensive SQL statement that I need to run - however I can't even get a simple statement to work.

Here is simplified version of the SQL code:


INSERT INTO "ExhibitorExport" ( "Export_Company" )

SELECT [Exhibitors].[Company] AS Export_Company

FROM Exhibitors;


When I 'run' this code, I get an error message stating: 'The given command is not a SELECT statement. Only queries are allowed.'

What is the proper SQL syntax within LO Base?

I have searched this forum for answers, didn't find anything applicable.


G-Jim c):{-

edit retag flag offensive close merge delete


LO Base uses HSQLDB.

ratrace gravatar imageratrace ( 2015-05-21 18:03:01 +0200 )edit

I think you also will need to quote out all of the column names and the table name.

doug gravatar imagedoug ( 2015-05-23 04:10:33 +0200 )edit

2 Answers

Sort by » oldest newest most voted

answered 2015-05-25 21:31:45 +0200

GJim gravatar image

Thanks for the information. Once I used that method, I was able to run my simple query -- now, to get the full query running. Again, thanks.

G-Jim c):{-

edit flag offensive delete link more

answered 2015-05-21 13:48:40 +0200

pierre-yves samyn gravatar image


Unfortunately this type of query can be executed only by the Tools SQL menu, then type or paste the SQL. The only queries that can run by double-clicking on their names are those generating a set of records (SELECT).

A workaround is to use Create Query in SQL View to type and save your SQL in order to copy and paste it when necessary. Alternatively, use macro...


edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower


Asked: 2015-05-21 12:21:55 +0200

Seen: 2,281 times

Last updated: May 25 '15