Issue 49008 - Any type of SQL query should be supported.
Summary: Any type of SQL query should be supported.
Alias: None
Product: Base
Classification: Application
Component: code (show other issues)
Version: 680m100
Hardware: All All
: P3 Trivial with 5 votes (vote)
Target Milestone: ---
Assignee: AOO issues mailing list
QA Contact:
Depends on:
Reported: 2005-05-10 13:04 UTC by valdisvi
Modified: 2013-02-07 22:32 UTC (History)
1 user (show)

See Also:
Issue Type: FEATURE
Latest Confirmation in: ---
Developer Difficulty: ---


Note You need to log in before you can comment on or make changes to this issue.
Description valdisvi 2005-05-10 13:04:30 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.
Comment 1 marc.neumann 2005-05-11 14:25:01 UTC

I reassign it to requirements for evaluating.

Bye Marc
Comment 2 brucehohl 2006-01-08 21:27:20 UTC
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.
Comment 3 Frank Schönheit 2006-01-09 07:31:18 UTC
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.
Comment 4 brucehohl 2006-01-10 02:35:07 UTC
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;
Comment 5 Frank Schönheit 2006-01-10 07:00:13 UTC
Ah, right, the error messages - sorry. Still I would have expected the queries
are executed, even if they're no SELECT statements. Hmm.