Mail Merge Useing Multiple Queries

Writing a book, Automating Document Production - Discuss your special needs here
Post Reply
A. Feit
Posts: 9
Joined: Fri Jul 08, 2016 2:48 pm

Mail Merge Useing Multiple Queries

Post by A. Feit »

I am trying to do a mail merge using two different queries from the same data base. When I go to print the document, the data of only one of the queries gets printed. How do I get the data of both queries gets printed?
OpenOffice 4.1.2 in Windows 10
User avatar
keme
Volunteer
Posts: 3704
Joined: Wed Nov 28, 2007 10:27 am
Location: Egersund, Norway

Re: Mail Merge Useing Multiple Queries

Post by keme »

AFAIK, Writer Mailmerge cannot use multiple data sources. You need to combine the queries.

If the data from the queries are "side by side", you need a single SELECT statement, picking fields from both queries (or the source tables for those queries), with source tuples joined by a common identifier field.

If you want the data records of one query to start when the other is finished, you need to make a UNION query from the two queries you have.

Not sure whether the UNION operator is available within BASE. If not, you need to run the mailmerge twice, changing sources. If you query an external database, server side queries should support all relevant operators.
Apache OO 4.1.12 and LibreOffice 7.5, mostly on Ms Windows 10
Post Reply