Problem Using UNION query

Creating tables and queries

Problem Using UNION query

Postby GMM_ISD » Tue Jul 08, 2008 7:32 am

Can anyone show me example how to use "UNION" in query designer. I tried using union query but Open office showed me ERROR Message.
OOo 3.0.X on Ms Windows XP
Posts: 1
Joined: Tue Jul 08, 2008 7:12 am

Re: Problem Using UNION query

Postby Villeroy » Tue Jul 08, 2008 10:01 am

Works in pass-through mode. View>SQL, Edit>Run SQL directly.
UNION and other set operations

Multiple SELECT statements joined with UNION, EXCEPT and INTERSECT are possible. Each SELECT is then treated as a term, and the set operation as an operator in an expression. The expression is evaluated from left to right but INTERSECT takes precedence over the rest of the operators and is applied first. You can use parentheses around any number of SELECT statements to change the evaluation order.

Just tested:
Code: Select all   Expand viewCollapse view
SELECT * FROM "Table1" union SELECT * FROM "Table2"
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04, no OpenOffice, LibreOffice 6.x
User avatar
Posts: 26980
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Return to Tables & Queries

Who is online

Users browsing this forum: Google [Bot] and 1 guest