too many records in merged piece

G

Guest

In publisher: I'm using a query (find unmatched query wizard) in access as
the merge information for my publisher piece. There are more records in the
merge than there are in the query. I am using two creteria to create the
query.
field creteria
[mailprogram] 20 days
[mailaddress] not like *ggw bad address*

The query gives me the correct records. In the merge records I get the
correct records for "20 days" but I also get the records that should be
excluded (and are excluded in the query) in the merged records. How can this
be?
 
G

Guest

hi,

Could be your SQL syntax. Could you post the SQL syntax you have?

Thanks
geebee
 
G

Guest

VBut the query results are correct, just the merge is wrong.
Here you go, thanks.
SELECT [Mailing List All Unsent].MAILPROGRAM, [Mailing List All
Unsent].M0VEDATE, [Mailing List All Unsent].SENTMETRO, [Mailing List All
Unsent].[GGW Update], [Mailing List All Unsent].OWNERFIRST, [Mailing List All
Unsent].OWNERLAST, [Mailing List All Unsent].MAILADDRES, [Mailing List All
Unsent].MAILCITY, [Mailing List All Unsent].MAILSTATE, [Mailing List All
Unsent].MZIPANDZIP, [Mailing List All Unsent].MLNUM, [Mailing List All
Unsent].STATUS, [Mailing List All Unsent].ADR, [Mailing List All
Unsent].AREA, [Mailing List All Unsent].CITY, [Mailing List All
Unsent].OFFMKTDT, [Mailing List All Unsent].ExprA, [Mailing List All
Unsent].STATCHDT, [Mailing List All Unsent].EXPIRDAT, [Mailing List All
Unsent].ExprB, [Mailing List All Unsent].OWNRNAME, [Mailing List All
Unsent].ZIPCODE, [Mailing List All Unsent].COMPLEX, [Mailing List All
Unsent].LOTSIZE, [Mailing List All Unsent].DAYSOMKT, [Mailing List All
Unsent].BEDROOMS, [Mailing List All Unsent].BATHROOM, [Mailing List All
Unsent].LOTSIZED, [Mailing List All Unsent].SALEPRIC, [Mailing List All
Unsent].APPGSQFT, [Mailing List All Unsent].LSPRC, [Mailing List All
Unsent].REMARKS, [Mailing List All Unsent].REMKSLN4, [Mailing List All
Unsent].GRSCHINC, [Mailing List All Unsent].GRSRNMUL, [Mailing List All
Unsent].TOTUNITS, [Mailing List All Unsent].APPRACRE, [Mailing List All
Unsent].CROSSST, [Mailing List All Unsent].LISTDATE, [Mailing List All
Unsent].SALEDATE, [Mailing List All Unsent].ORIGLSPR, [Mailing List All
Unsent].ORIGLSDT, [Mailing List All Unsent].TOUR1, [Mailing List All
Unsent].VIEWTYPE, [Mailing List All Unsent].AGE, [Mailing List All
Unsent].ANGRSINC, [Mailing List All Unsent].ANNEXP, [Mailing List All
Unsent].NETINCOM, [Mailing List All Unsent].CAPRATE, [Mailing List All
Unsent].OCCPDBY, [Mailing List All Unsent].SHOWINST, [Mailing List All
Unsent].MLSAREAMETRO, [Mailing List All Unsent].Expr1, [Mailing List All
Unsent].PARCEL, [Mailing List All Unsent].MAILNUMBER, [Mailing List All
Unsent].MAILSTREET, [Mailing List All Unsent].SITENUMBER, [Mailing List All
Unsent].SITESTREET, [Mailing List All Unsent].SITECITY, [Mailing List All
Unsent].Legal1, [Mailing List All Unsent].sitezip, [Mailing List All
Unsent].OWNERSTATUS, [Mailing List All Unsent].MAPGRID, [Mailing List All
Unsent].MAPPAGE, [Mailing List All Unsent].NBRHDCDE, [Mailing List All
Unsent].PRICE, [Mailing List All Unsent].DOCDATE, [Mailing List All
Unsent].USECD_USE, [Mailing List All Unsent].PHONE, [Mailing List All
Unsent].TENANTPH, [Mailing List All Unsent].DAYSOUT
FROM [Mailing List All Unsent] LEFT JOIN [Mailing List All Sent] ON [Mailing
List All Unsent].ExprA = [Mailing List All Sent].ExprA
WHERE ((([Mailing List All Unsent].MAILPROGRAM)="20 days") AND (([Mailing
List All Unsent].MAILADDRES) Not Like "*ggw*") AND (([Mailing List All
Sent].ExprA) Is Null));

geebee said:
hi,

Could be your SQL syntax. Could you post the SQL syntax you have?

Thanks
geebee


sierralightfoot said:
In publisher: I'm using a query (find unmatched query wizard) in access as
the merge information for my publisher piece. There are more records in the
merge than there are in the query. I am using two creteria to create the
query.
field creteria
[mailprogram] 20 days
[mailaddress] not like *ggw bad address*

The query gives me the correct records. In the merge records I get the
correct records for "20 days" but I also get the records that should be
excluded (and are excluded in the query) in the merged records. How can this
be?
 
G

Guest

hi,

If I am understanding correctly, you are trying to compare MS Access query
results to Mail Merge results from another MS Product? At this point I do
not see any red flags in your Access query. But I would suggest making a
smaller test query based on the larger query you posted, to see if that part
works fine. Specifically, this part: Mailing
List All Unsent].MAILADDRES) Not Like "*ggw*"). So create a small test
query with that condition.

I think there might be a way to look at the SQL syntax of the mail merge
query, but since I do not work with those regularly, I can't recommend how to
look at the mail merge SQL syntax (Microsoft Word 2003 features a standard
warning message that shows the SQL), but I suppose it differs slightly from
your Access query. Just a heads up that Microsoft Publisher handles data
sources slightly differently than Microsoft Word, and Microsoft Access for
that matter. Perhaps the mail merge query is missing some of the logic you
explicitly specified in your MS Access query? Or... the difference may be
possibly explained by something as simple as the mail merge query being
truncated because it exceeds the allowable length (of perahps 255 char).
This would certainly result in a query syntax difference, and therefore the
differing results.

I hope I didn't bore you to death! But I just didn't want to leave you
hanging on this one.

Hope this helps,
geebee




sierralightfoot said:
VBut the query results are correct, just the merge is wrong.
Here you go, thanks.
SELECT [Mailing List All Unsent].MAILPROGRAM, [Mailing List All
Unsent].M0VEDATE, [Mailing List All Unsent].SENTMETRO, [Mailing List All
Unsent].[GGW Update], [Mailing List All Unsent].OWNERFIRST, [Mailing List All
Unsent].OWNERLAST, [Mailing List All Unsent].MAILADDRES, [Mailing List All
Unsent].MAILCITY, [Mailing List All Unsent].MAILSTATE, [Mailing List All
Unsent].MZIPANDZIP, [Mailing List All Unsent].MLNUM, [Mailing List All
Unsent].STATUS, [Mailing List All Unsent].ADR, [Mailing List All
Unsent].AREA, [Mailing List All Unsent].CITY, [Mailing List All
Unsent].OFFMKTDT, [Mailing List All Unsent].ExprA, [Mailing List All
Unsent].STATCHDT, [Mailing List All Unsent].EXPIRDAT, [Mailing List All
Unsent].ExprB, [Mailing List All Unsent].OWNRNAME, [Mailing List All
Unsent].ZIPCODE, [Mailing List All Unsent].COMPLEX, [Mailing List All
Unsent].LOTSIZE, [Mailing List All Unsent].DAYSOMKT, [Mailing List All
Unsent].BEDROOMS, [Mailing List All Unsent].BATHROOM, [Mailing List All
Unsent].LOTSIZED, [Mailing List All Unsent].SALEPRIC, [Mailing List All
Unsent].APPGSQFT, [Mailing List All Unsent].LSPRC, [Mailing List All
Unsent].REMARKS, [Mailing List All Unsent].REMKSLN4, [Mailing List All
Unsent].GRSCHINC, [Mailing List All Unsent].GRSRNMUL, [Mailing List All
Unsent].TOTUNITS, [Mailing List All Unsent].APPRACRE, [Mailing List All
Unsent].CROSSST, [Mailing List All Unsent].LISTDATE, [Mailing List All
Unsent].SALEDATE, [Mailing List All Unsent].ORIGLSPR, [Mailing List All
Unsent].ORIGLSDT, [Mailing List All Unsent].TOUR1, [Mailing List All
Unsent].VIEWTYPE, [Mailing List All Unsent].AGE, [Mailing List All
Unsent].ANGRSINC, [Mailing List All Unsent].ANNEXP, [Mailing List All
Unsent].NETINCOM, [Mailing List All Unsent].CAPRATE, [Mailing List All
Unsent].OCCPDBY, [Mailing List All Unsent].SHOWINST, [Mailing List All
Unsent].MLSAREAMETRO, [Mailing List All Unsent].Expr1, [Mailing List All
Unsent].PARCEL, [Mailing List All Unsent].MAILNUMBER, [Mailing List All
Unsent].MAILSTREET, [Mailing List All Unsent].SITENUMBER, [Mailing List All
Unsent].SITESTREET, [Mailing List All Unsent].SITECITY, [Mailing List All
Unsent].Legal1, [Mailing List All Unsent].sitezip, [Mailing List All
Unsent].OWNERSTATUS, [Mailing List All Unsent].MAPGRID, [Mailing List All
Unsent].MAPPAGE, [Mailing List All Unsent].NBRHDCDE, [Mailing List All
Unsent].PRICE, [Mailing List All Unsent].DOCDATE, [Mailing List All
Unsent].USECD_USE, [Mailing List All Unsent].PHONE, [Mailing List All
Unsent].TENANTPH, [Mailing List All Unsent].DAYSOUT
FROM [Mailing List All Unsent] LEFT JOIN [Mailing List All Sent] ON [Mailing
List All Unsent].ExprA = [Mailing List All Sent].ExprA
WHERE ((([Mailing List All Unsent].MAILPROGRAM)="20 days") AND (([Mailing
List All Unsent].MAILADDRES) Not Like "*ggw*") AND (([Mailing List All
Sent].ExprA) Is Null));

geebee said:
hi,

Could be your SQL syntax. Could you post the SQL syntax you have?

Thanks
geebee


sierralightfoot said:
In publisher: I'm using a query (find unmatched query wizard) in access as
the merge information for my publisher piece. There are more records in the
merge than there are in the query. I am using two creteria to create the
query.
field creteria
[mailprogram] 20 days
[mailaddress] not like *ggw bad address*

The query gives me the correct records. In the merge records I get the
correct records for "20 days" but I also get the records that should be
excluded (and are excluded in the query) in the merged records. How can this
be?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top