Apache OpenOffice (AOO) Bugzilla – Issue 49008
Any type of SQL query should be supported.
Last modified: 2013-02-07 22:32:51 UTC
For insert query, e.g. "insert into Table2 (ID, Text) values (5, "as");" Base returns: "The given command is not a SELECT statement. Only queries are allowed." Why Base can't support any type of query, like to MS Access? From command "Run SQL directly" user could suppose that it should be possible. It will supplement data migration features, which now are quite weak.
Hi, I reassign it to requirements for evaluating. Bye Marc
In addition to SELECT queries I would especially like to see support for the following types of queries: APPEND, UPDATE, CREATE. Please note that even if these other types of queries can not be supported by the the graphical query design tool the ability to define these types of queries with SQL code and save the definition in the Query Container area would be helpful as these definitions would be available for reuse.
Switch the query designer to SQL view, and check the "Execute statement directly" button in the toolbox. You can then enter arbitrary text, and save it as query, since OOo won't try to interpret it anymore.
It is true that if I create a new query, then click "Switch Design View Off" and click "Run SQL command directly" I am able to save anything typed into the query definition window but only SELECT queries will run. If I type in an SQL command for an INSERT or DELETE query that runs properly via "Tools > SQL" it will not run from the query definition window. I get the following message: "The data content could not be loaded. Statement does not generate a result set." The following SQL commands run from "Tools > SQL" but fail from the query defination window: INSERT INTO "Assets" ("Description", "Cost") VALUES ('coaster', 5); DELETE FROM "Assets" WHERE "Description" = 'coaster' AND "Cost" = 5;
Ah, right, the error messages - sorry. Still I would have expected the queries are executed, even if they're no SELECT statements. Hmm.