Combining several WordMerge exports into one file

  • Thread starter Thread starter CPutnam
  • Start date Start date
C

CPutnam

Hi, all. I know how to produce WordMerge format files from Access queries
using ExportTo. It is great how these files come out with the field names
as the first record. I have 3 queries that I need to create WordMerge
format files for BUT I also need to combine those WordMerge files into ONE
file (with all the field names at the beginning of the file) because I have
one merge primary document that needs ALL the information from the queries.

I can't create one query with all the data because there is a distinct
possibility that at least one of my tables just won't have the data so the
query result would be blank, rather than having all information except for
the missing data. (And I've tried to use Right Joins for this large queries
but Access chokes because it doesn't like to deal with more than one Right
Join at a time).

I'd appreciate hearing any ideas you have. Thanks in advance. Carol.
 
Hi Carol,

It sounds as if you want to line up the three queries "side by side",
e.g. start with

Query 1
Field1A Field1B Field1C

Query 2
Field2A Field2B Field2C

and end up with

Combined
Field1A Field1B Field1C Field2A Field2B Field2C

If that's right, the best approach is almost certainly to do it in SQL
(I'm sure it's possible if you need help with the joins, ask in the
queries newsgroup microsoft.public.access.queries where the SQL experts
hang out).

But FWIW there are utilities specifically for lining up text files side
by side:
"paste" (outputs one line containing the first line of each of the
input files, a second line containing the second line of each,
and so on)
"join" (joins lines from text files on a common field, a bit like
a join in a query).
These and others are in the Gnu textutils package which can be
downloaded from http://unxutils.sourceforge.net/
 
Back
Top