By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
431,883 Members | 2,037 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 431,883 IT Pros & Developers. It's quick & easy.

command line mail merge from mysql db

P: n/a
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
Share this Question
Share on Google+
3 Replies


P: n/a
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

P: n/a
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

P: n/a

<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.