472,119 Members | 1,735 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,119 software developers and data experts.

command line mail merge from mysql db

I would like to be able to mail merge records from multiple mysql
tables using a simple template, preferably via a command line script.

MSWord mail merge via ODBC will not work for me as it only supports a
single table.

Are there any utilities or simple scripts avaialble that would
accomplish this?

Jul 10 '06 #1
3 11244
I found some software that seems like it will do the trick:

http://sourceforge.net/projects/mytextreport

"Create flexible reports from mysql-databases in any ASCII-based
format, like HTML, RTF, TEX, Postscript, VRML... whatever. Just edit a
template-file and insert special-coded, even relational
SQL-statements."

Unfortunately however, it is 7 years old, Is anyone aware of something
similar that is more recent?

Thanks

Jul 10 '06 #2
cd******@gmail.com wrote:
I would like to be able to mail merge records from multiple mysql
tables using a simple template, preferably via a command line script.

MSWord mail merge via ODBC will not work for me as it only supports a
single table.

Are there any utilities or simple scripts avaialble that would
accomplish this?
My workaround for this problem was to create a 'view' with the required
fields and use that to the Word mail merge. Worked a treat.
Jul 11 '06 #3

<cd******@gmail.comwrote in message
news:11**********************@h48g2000cwc.googlegr oups.com...
I would like to be able to mail merge records from multiple mysql
tables using a simple template, preferably via a command line script.

MSWord mail merge via ODBC will not work for me as it only supports a
single table.
That's not a problem! And ODBC will work just fine.

You need to create a query that produces that single table on the fly.
IOW - it needn't be a single table. It can (and should!) be a single query
that will be the result of joining multiple tables if that is what you need.
Are there any utilities or simple scripts avaialble that would
accomplish this?
A good start, if you are struggling with the concepts, would be to use
Microsoft Access. Create a database with linked tables to the several MySQL
tables you need to involve in your mail merge. Then use the MS Access
graphic query builder to create the table join you require. Your mail merge
uses the resulting query as it's data source.

But

If you are already comfortable with table joins, you can just create a pass
through query in MS Access. To an MS Word mail merge, a query is as good as
a table when looking for a data source.

Thomas Bartkus
Jul 11 '06 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

6 posts views Thread by jerrygarciuh | last post: by
6 posts views Thread by Paul Deverson | last post: by
6 posts views Thread by crealesmith | last post: by
27 posts views Thread by gerrymcc | last post: by
reply views Thread by leo001 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.