Issue 51380

Summary: UNION statement support
Product: Base Reporter: jhansonxi <jhansonxi>
Component: codeAssignee: AOO issues mailing list <issues>
Status: CONFIRMED --- QA Contact:
Severity: Trivial    
Priority: P3 CC: issues, thomas.tempe
Version: OOo 2.0 Beta   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Issue Type: ENHANCEMENT Latest Confirmation in: ---
Developer Difficulty: ---

Description jhansonxi 2005-06-29 20:24:01 UTC
Enter any SQL query with a UNION statement and an error is reported when saving:

The given command is not a SELECT statement.  Only queries are allowed.

UNION statements should be supported.
Comment 1 jhansonxi 2005-06-29 20:25:54 UTC
I forgot to mention that I'm using ODBC connected to an SQL Server 2000
database.  I haven't tried any other connect method so I don't know if it is an
ODBC-specific limitation or not.
Comment 2 johnix 2005-07-14 13:32:44 UTC
I reproduced that issue on build m113 using PostgreSQL with the Postgresql SDBC 
driver v. 0.62 
Comment 3 johnix 2005-07-14 13:36:52 UTC
... and GNU/Linux x86. 
Comment 4 marc.neumann 2005-07-22 13:08:29 UTC
Hi,

I reassign this enhancement to the User Experience team for evaluating.

Bye Marc
Comment 5 mbria 2009-01-26 17:44:50 UTC
Same issue with:
* OO 2.4.1
* com.mysql.jdbc
* MySQL 5.1
* Ubuntu 8.10 client
* Ubuntu 8.04 server

There is a workaround published somewhere in forums:  

View > Switch Design Off
Edit > Run SQL command
Comment 6 springm 2009-08-13 14:53:24 UTC
Reported 

This workaround works is fine without any parameters, but it does not work with
any variables in the WHERE clause of the query because the query is sent
directly to the SQL Server. 

So it is not possible to make pre-defined queries with (=:paramater or
=[parameter] )for our users containing any UNION command. This prevents us using
Ooo as a reporting tool for our users.

It would be very fine to have Ooo Base enhanced with the UNION feature.
Comment 7 springm 2009-08-13 14:54:46 UTC
Appendum to my perivious comment:

This is reported for Ooo Base 3.1.